
The below command executes a script to automatically setup and configure a production ready MERN Stack web server on Ubuntu that includes Node.js, MongoDB, PM2, NGINX and UFW.įor more details about how the script works see Setup Node.js + MongoDB Production Server on Ubuntu. Setup Web Server with Node.js + MongoDB + NGINX NOTE: If you're using Windows you can connect to your instance via SSH using the PuTTY SSH client, for instructions see Connect Using PuTTY in the AWS docs. Enter yes to the prompt "Are you sure you want to continue connecting (yes/no)?" to add the url to your list of known hosts.

Mern stack tutorial update#
Mern stack tutorial download#
"my-aws-key") and click "Download Key Pair" to download the private key, you will use this to connect to the server via SSH.
Mern stack tutorial registration#
NodeJS + MongoDB - Simple API for Authentication, Registration and User Management.React + Redux - User Registration and Login Tutorial & Example.For more in-depth information about the React app or Node.js api used in this post, check out the following tutorials which cover them in detail:

This tutorial will be focused on setting up the server on AWS EC2, then deploying and configuring the front-end and back-end pieces of the MERN stack app to work together.

Other variations of the stack include the MEAN Stack that has an Angular front-end, and the MEVN Stack that has a Vue.js front-end. In this tutorial we're going to setup a production ready web server from scratch on the Amazon EC2 (Elastic Compute Cloud) service, then deploy a custom MERN Stack application to it that supports user registration and authentication.Ī MERN Stack application is made up of a front-end app built with React that connects to a back-end api built with Node.js + Express + MongoDB, hence the name MERN Stack (Mongo, Express, React, Node).
