Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
You probably Googled it it and are here! Okey, no more time waste (for MYSELF in future)âŠ
Letâs see how to setup node app with SSL on a DigitalOcean VPS
- Install Heroku for itâs versioning feature
- Git push the app to Heroku
- Setup a drop let
- Generate SSHÂ keys
- Setup git bash for SSH-ing to droplet
- Connect to Droplet using SSHÂ keys
- Install node
- Confirm node installation using node -v
- Install MongoDB if the app needs to persist data
- Confirm if mongodb is running using the command sudo systemctl status mongodb
- Setup and configure pm2 to orchestrate the node app
- Confirm pm2 installation using pm2Â -v
- Clone to a location in the server
- Start the node app for first cut testing
- Start node app as a process
- Install nginx
- Make sure that the nginx service is running using command sudo systemctl status nginx
- Make sure that UFW is enabled
- Setup nginx reverse proxy to the port on which the app is running
- When reverse-proxying nginx server, keep try_files $uri $uri/ =404; inside location if absolutely necessary inside /etc/nginx/sites-available/default
- Purchase a domain
- Set up SSL with Letâs Encrypt for the purchased domain
- Keep a backup of default nginx configuration (and all other important stuff) to revert back in case of an earthquack
Notice that we shall use services like herokuâs git feature instead of the globally famous github for version control to keep code closed source.
Originally published at xameeramir.github.io.
Setting up node app with SSL on a DigitalOcean droplet was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.