Skip to content

Satishchoudhary94/AWS_Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

🌍 WanderLust - Deploy Node.js App on AWS EC2 (Without Docker)

WanderLust is a full-stack Node.js web application that can be deployed on an AWS EC2 instance without using Docker. This guide walks you through every step to host your app using PM2 and Node.js on Ubuntu.


πŸš€ Deployment Steps (No Docker Required)

πŸ”Ή 1. Launch EC2 Instance

  1. Go to AWS EC2 Console
  2. Click Launch Instance
  3. Choose:
    • Amazon Machine Image (AMI): Ubuntu 22.04
    • Instance Type: t2.micro (Free Tier eligible)
    • Key Pair: Create or use an existing .pem file
  4. Security Group Configuration:
    • βœ… Allow SSH (Port 22)
    • βœ… Allow HTTP (Port 80)
    • βœ… Add Custom TCP Rule: Port 3000, Source: 0.0.0.0/0

πŸ”Ή 2. Connect to EC2

ssh -i /path/to/your-key.pem ubuntu@<your-ec2-public-ip>

πŸ”Ή 3. Install Node.js, npm, and Git

sudo apt update
sudo apt install nodejs npm git -y
node -v
npm -v

πŸ”Ή 4. Upload Project Code

git clone https://github.com/Satishchoudhary94/WanderLust.git
cd WanderLust

πŸ”Ή 5. Install Dependencies and Set Up .env

cd WanderLust
npm install

Create a .env file in the root of the project and add:

CLOUD_NAME=
CLOUD_API_KEY=
CLOUD_API_SECRET=
MAP_API_KEY=
ATLAS_URL=mongodb+srv://schoudhary3741:7y7EW1oIqPGKRpKk@cluster0.d6ptcxb.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
or
MONGO_URL=your_mongodb_connection_string

πŸ”Ή 6. Start the Server

node app.js

πŸ”Ή 8. Access the App

http://<your-ec2-public-ip>:3000

πŸ“ Project Structure Overview

WanderLust/
β”œβ”€β”€ app.js
β”œβ”€β”€ package.json
β”œβ”€β”€ .env
β”œβ”€β”€ /routes
β”œβ”€β”€ /views
β”œβ”€β”€ /models
β”œβ”€β”€ /controllers
β”œβ”€β”€ /public

πŸ‘¨β€πŸ’» Author Satish Choudhary GitHub: @Satishchoudhary94

Thanks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors