Skip to content

Instantly share code, notes, and snippets.

View JDeepD's full-sized avatar
:shipit:
Learning

Jaydeep Das JDeepD

:shipit:
Learning
View GitHub Profile
@JDeepD
JDeepD / instructions.md
Last active October 28, 2024 13:38
NodeJS Backend Deployment on AWS
  1. Create an AWS EC2 Instance with Ubuntu AMI.
  2. SSH into the EC2 instance.
  3. Install fnm : curl -fsSL https://fnm.vercel.app/install | bash
  4. Select a Node version to install. For example : fnm use 20 (Will install Node v20)
  5. Install pnpm: npm i -g pnpm and setup : pnpm setup
  6. Clone your backend into EC2.
  7. Install pm2 : pnpm i -g pm2.
  8. Install project depedencies: pnpm install --frozen-lockfile
  9. Put Environment Variables in .env.
  10. If you have a domain for the API, go to manage DNS records and create an A record with value as the EC2 Public IP.