What is the MERN stack?
M in MERN stands for MongoDB. MongoDB is a simple NoSql and object-oriented database technology that is efficient and scalable for large data storage. MongoDB stores data as objects in JSON format, in separate documents instead of storing in rows and columns like in a typical relational database. This increases productivity in the manipulation and retrieval of data in abundance.
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 dnf -y update
step 2: Install MongoDB
for installing mongoDB you need to first open the file for adding content to your repository.
sudo vi /etc/yum.repos.d/mongodb.repo
the terminal should give you an ok.
Now install mongoDB by simplifying running
sudo apt install -y mongodb
name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
sudo dnf install mongodb-org
sudo systemctl enable mongod.service sudo systemctl start mongod.service
sudo systemctl stop mongod sudo systemctl restart mongod
Step 3: installing Node JSfrom fedora 24 and onwards, npm comes in part with node js so you don’t have to install it separately.
sudo dnf install nodejs
dnf module list
sudo dnf module install nodejs:10
step 4: install express js
run the following command to get and install express JS in fedora.
First install npm,
npm install -g express
Now this install express cli to help you in creating the basic web site structure.
Create a new project to test your installation. First create a new folder in which you will get all the dependencies of the project to be created
npm init mkdir projectName cd projectName express npm install
Step 5: installing React
you can start by creating a folder and installing all your dependencies in it.
mkdir ReactProject cd ReactProject
npm install -g create-react-app
npx create-react-app name-of-app