Skip to content

Instantly share code, notes, and snippets.

@Harsh-js
Forked from piyushgarg-dev/nginx_aws.md
Created October 6, 2023 11:04
Show Gist options
  • Save Harsh-js/ad9da4b6a1b5abf9e5e7092c04f8fef3 to your computer and use it in GitHub Desktop.
Save Harsh-js/ad9da4b6a1b5abf9e5e7092c04f8fef3 to your computer and use it in GitHub Desktop.

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Create Free AWS Account

2. Create and Lauch an EC2 instance and SSH into machine

3. Install Node and NPM

curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs

node --version

4. Clone your project from Github

git clone https://github.com/piyushgargdev-01/short-url-nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment