17

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.

3

2 Answers 2

10

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

Sign up to request clarification or add additional context in comments.

1 Comment

This is a very basic setup - just launch a server image and ssh into it and do the setup. Do you know if there's a CloudFormation template or something similar ready for a basic but scalable configuration?
7

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

Here's a tutorial from 2015.

2 Comments

I have to admit that these docs are poorly explaining some failures a developer may encounter during the step-by-step configuration and if he want to, for example, create another S3 bucket name for same stack. It requires not a single day to actually learn how to use CloudFormation... But unfortunately I can't advise anything better. MongoDB team (Atlas etc) and AWS are now in hot competition since DocumentDB was introduced.
Yes, the docs get you started, but they really just lead you down a rabbit hole of new links to terms and other services you may or may not need. If you are operating under the Free Tier, and you are new to working with AWS, I would strongly suggest that you pay attention to what your costs would be with out the free tier plan.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.