Exported on 25-Sep-2021 14:45:10
Parameters
1 - Update apt repositories
Update apt packages.
Login as user {s1c} on node {s1}
# Install APT update
sudo yum -y update
2 - Install NodeJS and NPM
Installs Node.js v16 and NPM.
Login as user {s1c} on node {s1}
# Add nodejs 16 ppa (personal package archive) from nodesource
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
# Install nodejs and npm
sudo apt-get install -y nodejs
3 - Install MongoDB
Installs and configures MongoDB Database server.
Login as user {s1c} on node {s1}
# import mongodb 4.0 public gpg key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
# create the /etc/apt/sources.list.d/mongodb-org-4.0.list file for mongodb
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
# reload local package database
sudo apt-get update
# install the latest version of mongodb
sudo apt-get install -y mongodb-org
# start mongodb
sudo systemctl start mongod
# set mongodb to start automatically on system startup
sudo systemctl enable mongod
4 - Install ExpressJS
Installs Express JS - A Node.js web application framework.
Login as user {s1c} on node {s1}
sudo npm install -g express
5 - Setup React Development Environment
Install React.js, creates a React project and launches the React development server.
5.1 - Create React App
Creates a basic React application.
Login as user {s1c} on node {s1}
# Scaffold a react project
npx create-react-app myfirstreactapp
5.2 - Start React Development Server
Starts the react development server in background.
To access the running server process, use the command:
screen -x
Login as user {s1c} on node {s1}
# Change working directory
cd myfirstreactapp
# Install screen package
sudo yum -y install screen
# Configure screen to run in background
sudo echo "zombie xy" >> ~/.screenrc
# Start development server
screen -d -m npm start
Installs MERN Stack Development Server on Linux Systems.
This Blueprint Installs MERN Stack development server on a Debian Based Systems.
MERN stands for MongoDB, ExpressJS, ReactJS and Nginx web server. This blueprint install all these components on the target system and launches a react development server.
MongoDB MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.
Express Express.js, or simply Express, is a back end web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs.
ReactJS React is a free and open-source front-end JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies.
Nginx NginX, is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software.
Pre-Blueprint Attune setup
Blueprint Steps