Coder Social home page Coder Social logo

cornerstone-04 / aws-session Goto Github PK

View Code? Open in Web Editor NEW

This project forked from verma-kunal/aws-session

0.0 0.0 0.0 38.86 MB

Deploying a Node Js Application on AWS EC2

License: MIT License

JavaScript 2.70% CSS 12.53% HTML 84.27% Dockerfile 0.49%

aws-session's Introduction

Deploying a Node Js Application on AWS EC2

Testing the project locally

  1. Clone this project
git clone https://github.com/verma-kunal/AWS-Session.git
  1. Setup the following environment variables - (.env) file
DOMAIN= ""
PORT=3000
STATIC_DIR="./client"

PUBLISHABLE_KEY=""
SECRET_KEY=""
  1. Initialise and start the project
npm install
npm run start

Set up an AWS EC2 instance

  1. Create an IAM user & login to your AWS Console
    • Access Type - Password
    • Permissions - Admin
  2. Create an EC2 instance
    • Select an OS image - Ubuntu
    • Create a new key pair & download .pem file
    • Instance type - t2.micro
  3. Connecting to the instance using ssh
ssh -i instance.pem ubunutu@<IP_ADDRESS>

Configuring Ubuntu on remote VM

  1. Updating the outdated packages and dependencies
sudo apt update
  1. Install Git - Guide by DigitalOcean
  2. Configure Node.js and npm - Guide by DigitalOcean

Deploying the project on AWS

  1. Clone this project in the remote VM
git clone https://github.com/verma-kunal/AWS-Session.git
  1. Setup the following environment variables - (.env) file
DOMAIN= ""
PORT=3000
STATIC_DIR="./client"

PUBLISHABLE_KEY=""
SECRET_KEY=""

For this project, we'll have to set up an Elastic IP Address for our EC2 & that would be our DOMAIN

  1. 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

Project is deployed on AWS ๐ŸŽ‰

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.