- Clone this project
git clone https://github.com/verma-kunal/AWS-Session.git
- Setup the following environment variables -
(.env)
file
DOMAIN= ""
PORT=3000
STATIC_DIR="./client"
PUBLISHABLE_KEY=""
SECRET_KEY=""
- Initialise and start the project
npm install
npm run start
- Create an IAM user & login to your AWS Console
- Access Type - Password
- Permissions - Admin
- Create an EC2 instance
- Select an OS image - Ubuntu
- Create a new key pair & download
.pem
file - Instance type - t2.micro
- Connecting to the instance using ssh
ssh -i instance.pem ubunutu@<IP_ADDRESS>
- Updating the outdated packages and dependencies
sudo apt update
- Install Git - Guide by DigitalOcean
- Configure Node.js and
npm
- Guide by DigitalOcean
- Clone this project in the remote VM
git clone https://github.com/verma-kunal/AWS-Session.git
- Setup the following environment variables -
(.env)
file
This .env file contains the details of Publishable Key and Secret Key from stripe Website . Got to developrs and API Keys , you will get the keys their and paste it in bottom of your .env file
After creating .env file you shoud run the following commands to execute it
$ npm install - It will install all packages
$ npm run start - It will start the application on port no 3000 and you should open it in EC2 Security Gropus.
Then finally run the app in web browser http:// <public Ip:3000>/
DOMAIN= "http:// <public Ip:3000>/"
PORT=3000
STATIC_DIR="./client"
PUBLISHABLE_KEY="pk_test_51N9SecSHA1SReqCrhVasZywYf4x5v3Wz9EKaiwVEn0sXwjTggZHH8TCttpP8VnX5mZjlFhULYsw9wBUpupcT9i0u00SAUD4ilD"
SECRET_KEY="sk_test_51N9SecSHA1SReqCrs5dwLOCJNGWGj3rRhG1QbYfRybuT5jh6u7GKZFNNTUzbQ2oTGpOEB6payPBZFC90CxXHT29Q00SwjlKM6G"
For this project, we'll have to set up an Elastic IP Address for our EC2 & that would be our
DOMAIN
- Initialise and start the project
npm install
npm run start
NOTE - We will have to edit the inbound rules in the security group of our EC2, in order to allow traffic from our particular port