What is the MEVN 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.
V in MEVN for VueJS. Similarly, MEVN is like MEAN and MERN but uses VueJS for its front-end development. VueJS is also used for developing front end. It’s another alternative to create a responsive and strong UI.
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
after the file is open, write the following content to add to your repository.
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
now you can easily run the following command to install MongoDB in fedora.
sudo dnf install mongodb-org
Press ‘y’ to complete your installation. Now you need to start your newly installed mongodb. For that run the following command.
sudo systemctl enable mongod.service sudo systemctl start mongod.service
You can stop and restart MongoDB by the following commands
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
modules for available version can be looked up by running
dnf module list
and for installing different version
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
once the project is installed, try running it with node app
Run the command to install
Step 5: installing VueJS
To install VueJS in Fedora, you need to first install Vue cli. As mentioned above, cli allows you to add services, packages, and components to your Vue js easily.
To install VueJS run the following command
npm install -g @vue-cli-service-global
install vue files in your project.
cd project-name npm install
now run your project.
you can update your Vue if you already have it installed
npm run dev