Steps to deploy Node.js to VPS using PM2 and Github Actions
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
| name: "Build and deploy Nuxt SSR with PM2" | |
| on: [push] | |
| jobs: | |
| build: | |
| name: "Build Nuxt Application" | |
| runs-on: [self-hosted, ARM64] # you can also use buildjet.com | |
| environment: | |
| name: "Production" | |
| steps: | |
| - uses: actions/checkout@v3 |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.
- at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
- check
nginx -Vfor the following:... TLS SNI support enabled
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- When only changing documentation, include
[ci skip]in the commit title - Consider starting the commit message with an applicable emoji
Using - "quill": "^2.0.0-rc.2"
Adjust app.js depending on your use case - I am using it in a Laravel/Inertia project so I've got the Editor component registered in the CreateInertiaApp.
The other files I've got in a quill folder (quill_options.js is quill/options.js, etc.)
-
Open Windows Powershell: Navigate to your Start menu, type "Powershell", and select "Windows Powershell" from the search results.
-
Run Installation Command: In the Powershell window, paste the following command and press Enter:
Note: If you've installed Python through the Microsoft Store, replace py with python in the command below.
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
