Node js and MongoDB app on AWS
Solution 1
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,
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,
5: Launch MongoDB and run Nodejs to start node server,
6: Test back-end server using Postman or Browser.
Other useful linkYouTube
Solution 2
AWS has a full documentation for this on their website. These documentations are extremely thorough and you should read these first.
Nimit Bedi
Updated on June 01, 2022Comments
-
Nimit Bedi almost 2 years
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.
-
boldnik almost 5 yearsI 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.
-
boldnik almost 5 yearsThis 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?