Setting up the MEAN Stack on Ubuntu System

Posted By : RAJAT KATIYAR | 29-Jun-2016

MEAN Stack Ubuntu

MEAN Stack basically comprises of the MongoDb, Express Framework, Angular JS and Node JS. MongoDb manages the database, Express is the Framework, Angular JS is for the front end while the Node JS is for the backend. MEAN stack is basically used for developing the web applications which are dynamic and versatile. All the technologies which are used in MEAN are developed and programmed in JavaScript.

 

MEAN Stack is much more popularly used stack than other stacks, due to some of its advantages, like:

  1. All the platforms used here requires only one language.

  2. Follows the patterns in accordance to the MVC i.e. Model View Controller

  3. JSON is used for the transferring of the data from server to the client and vice-versa.

  4. NodeJS has a highly modular architecture which helps in ease in the development.

  5. The MEAN Stack is open-source, so it can be changed and used as per our requirements.  

 

In order to setup the MEAN Stack on your Ubuntu system, follow the undermentioned steps:

Setting up the MongoDb

The commands required for the installation of the mongo db, execute these ccommands in your terminal:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list

sudo apt-get update

sudo apt-get install mongodb-10gen

Installing CURL

CURL is important to install for the MEAN Stack, becasue it helps in server to server data transfer.

The commands are:

 

sudo apt-get update

sudo apt-get install curl

Installing Grunt

Grunt is meant for binding all the files before building the front end build.

The commands are:

sudo apt-get update

sudo apt-get -y dist-upgrade

sudo npm install -g grunt grunt-cli grunt-contrib-clean grunt-replace grunt-contrib-concat grunt-contrib-watch grunt-contrib-jasmine grunt-contrib-connect grunt-saucelabs grunt-gitinfo

Installing Bower

Bower is meant for the management of the dependencies. This is the tool which manages the front end components namely, html, css js etc.

The commands are:

sudo npm install bower -g

Now after following the above steps, the MEAN Stack is ready for the development of a project.

Setting up the Node JS

The NodeJS is the java script meant for the backend development in a MEAN Stack project. The installation commands are:

sudo apt-get update

sudo apt-get install nodejs

Now install the NPM i.e Node Package Manager, which helps in the installation of the node modules and the packages.

The installation command si:

sudo apt-get install npm

Now the MEAN Stack set-up is complete and can be used for the development.

 

THANKS

 

About Author

Author Image
RAJAT KATIYAR

Rajat Katiyar is a very bright web app developer, he has good knowledge of JAVA, C/C++, C#.NET. Apart from this he has interest in theater and sports.

Request for Proposal

Name is required

Comment is required

Sending message..