MEAN, short for MongoDB, Express, AngularJS, and Node, is a fullstack JavaScript framework that simplifies and accelerates application development by giving you the tools needed to quickly create and deploy your application. In this article, I will show you how to install and create a basic MEAN application on Ubuntu 14.04 x64.
The first thing that you will want to do is to install Node. There are several ways of doing this, but for now we will use a NodeSource. For stability purposes, we will be installing Node.js 10.40. The latest version of Node should work, but there is no promise of stability. To install, run the following command:
curl -sL https://deb.nodesource.com/setup_0.10 | sudo -E bash -
apt-get install -y nodejs
After the installation is complete, run node -v
and the version will be displayed. Re-run the installation if the version is older than v0.10.40
.
We will need Gulp and Bower for using Mean.js. To install those, run the following:
npm install -g gulp
npm install -g bower
Once these are installed, you can proceed to the next step.
Installing Mean.js is very simple, Run the following command to install the cli needed to create your application:
npm install -g mean-cli
Once the installation is complete, run mean -v
. The version will be at least 0.10.14
.
To setup a project, run the following command:
mean init server
cd server && npm install
gulp
Upon success, you will be able to go to http://[SERVER_IP]:3000
in your browser (change the IP accordingly) to see the default Mean.js application page.
You could earn up to $300 by adding new articles