GithubHelp home page GithubHelp logo

eltonlazzarin / nodejs-aws-deploy Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.83 MB

Simple Jobs API built in Node.js and deployed on AWS

Home Page: http://ec2-35-175-146-94.compute-1.amazonaws.com:3000

License: MIT License

Dockerfile 31.23% JavaScript 68.77%
amazonwebservice awsexperience awsskills becomeacloudexpert awscloud nodejs javascript javascriptapp backenddeveloper developer

nodejs-aws-deploy's Introduction

Simple Jobs API built in Node.js and deployed on AWS

GitHub top language GitHub language count GitHub last commit GitHub issues GitHub

About The Project   |    Backend Technologies   |    Backend Getting Started   |    How To Contribute   |    Backend License

👨🏻‍💻 About the project

Project API

This project consists of a simple API that shows some fictional jobs, but the main purpose was to create it to deploy to AWS for learning purposes with the cloud platform, where an EC2 instance was created and an application was uploaded Node.js which is the API itself within a Docker image and finally expose this API on the internet publicly.

🚀 Backend Technologies

Technologies that I used to develop this api

💻 Backend getting started

Requirements

Clone the project and access the folder

$ git clone https://github.com/eltonlazzarin/nodejs-aws-deploy.git

$ cd nodejs-aws-deploy

Follow the steps below

# Install the dependencies
$ yarn

💻 Run API Locally

Creating Docker environment with Node.js

# Create docker enviroment
$ docker-compose up

Run the API

# Run the API
$ yarn start

Acccess the API

http://localhost:3000

💻 Deploy API on AWS

Generating AWS account permissions

$ aws configure

# AWS Console -> AWS User -> My Security Credentials -> AWS IAM credential and click Create access key button and then copy Access key ID and paste bellow
AWS Access Key ID [***************CTPA]:

AWS Access User

AWS Create Access Key

Create an EC2 instance on AWS

$ docker-machine create --driver amazonec2 INSTANCE_NAME

Connect the terminal to EC2 instance

$ eval $(docker-machine env INSTANCE_NAME)

Create docker image in EC2 instance

$ docker-compose up -d

Expose port 3000 on AWS

EC2 -> Security Groups -> Select docker-machine -> Inbound -> Edit -> Add Rule -> Type: Custom TCP Rule -> Protocol: TCP -> Port Range: 3000 -> Source: Custom -> 0.0.0.0/0 -> Save

Console AWS EC2

AWS Expose Port

Access your API

EC2 -> Instances -> Select your instance -> Copy and paste Public DNS (IPv4) on your web browser followed by the port, like http://ec2-3-89-91-138.compute-1.amazonaws.com:3000

Access API Via Web Browser

Disconnect terminal to EC2 instance

$ eval $(docker-machine env INSTANCE_NAME -u)

🤔 How to contribute backend

Follow the steps below

# Clone your fork
$ git clone https://github.com/eltonlazzarin/nodejs-aws-deploy.git

$ cd nodejs-aws-deploy

# Create a branch with your feature
$ git checkout -b your-feature

# Make the commit with your changes
$ git commit -m 'feat: Your new feature'

# Send the code to your remote branch
$ git push origin your-feature

After your pull request is merged, you can delete your branch

📝 Backend License

This project is under the MIT license. See the LICENSE for more information.


Made with ♥ by Elton Lazzarin 👋 Get in touch!

nodejs-aws-deploy's People

Contributors

eltonlazzarin avatar

Stargazers

 avatar

Watchers

 avatar

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.