What is 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.
he first thing before starting is to update your OS
step 1: update
sudo apt update
step 2: Install MongoDB
you 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
Your MongoDB should be installed and ready to use. Run the following command to start your database.
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
You can verify that your mongoDB is up and running by checking its status
sudo systemctl status mongod
You can stop and restart MongoDB by the following commands
sudo systemctl stop mongod sudo systemctl restart mongod
Step 3: installing Node JS
First, you need to make sure you have curl installed
sudo apt install curl
then run the following command to download node
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
now install node js by simply running
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
You can create a directory and install express in it to keep all the dependencies in a file.
mkdir directoryName cd directoryName
Execute the following command
after running the command it will ask you details of your project or app to be created. Fill them in and continue
Run the command to install
sudo npm install express –save
Step 5: installing VueJS
To install VueJS in your ubuntu 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
wait till the installation is completed then you can check if Vue JS is installed.
you can update your Vue if you already have it installed
npm update -g @vue/cli
After installation is finished, you can create a project and start the server by running the command