Table of Contents
What is the MERN stack?
E in MERN stack stands for express JS. Express js or express is a node js framework that promotes the rapid development of node-based web and mobile applications. Express supports the MVC framework which helps in building more scalable, structured and dynamic websites. Express focuses more on the back-end or the developer side.
sudo apt update
Step 2: Install MongoDByou need to install MongoDB from its repository. For that, you need to get the key first. type the following command.
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
the terminal should give you an ok.
Now install mongoDB by simplifying running
sudo apt install -y mongodb
sudo systemctl start mongod
If you get the following result “failed to start mongod.service…..”
then reload mongoDB and run the above command again. For reloading run:
sudo systemctl daemon-reload
sudo systemctl status mongod
sudo systemctl stop mongod sudo systemctl restart mongod
Step 3: installing Node JSFirst, you need to make sure you have curl installed
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
step 4: install express js
Once node js is installed you can use npm to install express easily.
First install npm,
sudo apt install npm
mkdir directoryName cd directoryName
sudo npm install express –save
Step 5: installing Reactyou can start by creating a folder and installing all your dependencies in it.
cd desktop mkdir project cd project
npm install -g create-react-app
npx create-react-app name-of-app