Back to Browse

Deploy a Web application on AWS cloud using EC2 instance #aws #ec2 #nodejs #postgresql #hindi

122 views
Sep 10, 2025
45:40

Are you building a web application and want to deploy it securely on your own domain? In this video, I’ll walk you through the step-by-step process of deploying a secure web application with domain-based deployment. Github Link - https://github.com/shivm04/Doctor-Application.git Webapplication Setup Guide- Installation - sudo apt-get update sudo apt install net-tools sudo apt install curl wget git -y curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install --lts sudo apt install nginx sudo apt install postgresql postgresql-contrib -y sudo systemctl status postgresql sudo systemctl enable postgresql Code Cloning - git clone https://github.com/shivm04/Doctor-Application.git sudo mkdir Doctor-Application sudo chown ubuntu:ubuntu Doctor-Application/ git clone https://github.com/shivm04/Doctor-Application.git Doctor-Application/ Database Setup - sudo -i -u postgres psql CREATE DATABASE doctor; CREATE USER "user" WITH ENCRYPTED PASSWORD 'pass'; GRANT ALL PRIVILEGES ON DATABASE doctor TO "user"; \q ALTER USER "user" WITH SUPERUSER; \q Application Setup - npm install npm install -g prisma npm install -g typescript npx prisma generate npx prisma migrate dev npm start npm install -g pm2 cd /var/www/Doctor-Application/ pm2 start npm --name doctor-frontend -- start cd api/ pm2 start npm --name doctor-backend -- start sudo netstat -pntl systemctl status postgresql Domain & Proxy Setup - sudo apt install nginx sudo doctor.cloudpita.conf sudo vi doctor.cloudpita.conf sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d doctor.cloudpita.com sudo nginx -t sudo systemctl restart nginx.service Nginx Configuration File - server { listen 80; server_name doctor.cloudpita.com; # Frontend (React app served by PM2 on port 3000) location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } # Backend (Node API served by PM2 on port 5050) location /api/ { proxy_pass http://127.0.0.1:5050/api/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }

Download

0 formats

No download links available.

Deploy a Web application on AWS cloud using EC2 instance #aws #ec2 #nodejs #postgresql #hindi | NatokHD