Table of Contents
What is the MEAN stack?
M in MEAN 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 MEAN 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.
A in mean stack stands for Angular. Angular is an MVC framework for the client end or front end. Angular allows us to create a strong interactive web or mobile application. It also has great support for creating cross-platform and progressive web applications.
Fedora is a Linux distributed Operating System. In this section of the article, we will cover how to install MEAN/MERN/MEVN in fedora.
Step 1: Update
the first thing before starting is to update your OS
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 JS
from 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 ExpressJS
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
once the project is installed, try running it with node app
Run the command to install
Step 5: Installing Angular
You will have to make sure that you have npm installed and running for Angular as well. You can install angular cli through running the command
npm install -g @angular/cli
npm install -g @angular/[email protected]