Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node js and MongoDB app on AWS

What are the steps for deploying a Node js app, with express.js framework and MongoDB as database on AWS? This is my first such activity and I am not able to find any reliable source over the net.

like image 259
Nimit Bedi Avatar asked Nov 01 '16 17:11

Nimit Bedi


People also ask

Can MongoDB be used in AWS?

MongoDB is an AWS Partner. To launch a fully managed MongoDB cluster on AWS, try it for free from AWS Marketplace. AWS Service Catalog administrators can add this architecture to their own catalog.

Can you use node js with AWS?

To set up an AWS Node. js environment in which you can run your application, use any of the following methods: Choose an Amazon Machine Image (AMI) with Node. js pre-installed and create an Amazon EC2 instance using that AMI.

How does MongoDB connect to AWS?

In the Amazon EC2 console, choose the instance, and then choose Connect. Once you connect to the bastion host instance by using SSH, you can connect to any of the MongoDB nodes in a similar fashion (choose the node, and then choose Connect to find the SSH command).

Is MongoDB Free on AWS?

For a fully managed MongoDB cluster, try it for free on AWS Marketplace. This Quick Start is for developers and DevOps professionals who want to deploy a flexible, fully managed databases on AWS using MongoDB Atlas.


2 Answers

Deploy nodejs-express-mongoDB backend on AWS EC2 Ubuntu(16.04)

Back-end is a private repo on Gitlab.

Steps: 1: Create EC2 Ubuntu server on AWS,

create EC2 instance

2: Connect personal computer with AWS server - use to control cloud Ubuntu server on personal computer,

Connecting Linux Instance from Windows Using PuTTY

3: Clone repo from Gitlab to Ubuntu server,

Configure ssh key on linux server

Clone gitlab repo to linux server

4: Install Nodejs and MongoDB on Ubuntu server,

Install Nodejs

Install MongoDB

Install MongoDB

5: Launch MongoDB and run Nodejs to start node server,

6: Test back-end server using Postman or Browser.

Other useful linkYouTube

like image 65
Xianwei Avatar answered Sep 28 '22 16:09

Xianwei


AWS has a full documentation for this on their website. These documentations are extremely thorough and you should read these first.

  • MongoDB on AWS
  • Node.js on AWS
  • Express.js on AWS

Here's a tutorial from 2015.

like image 24
Shruggie Avatar answered Sep 28 '22 16:09

Shruggie