Express JS is a Node JS web application framework. Here I am telling about the installation of Express JS and create your small test application using MEAN . Also I am assuming you have already installed Node.Js and MongoDB in your system . If not then please follow my previous blogs.
For Mongo DB installation: http://findnerd.com/account#url=/list/view/MongoDB-Installation-steps-for-Ubuntu/19769/
For Angular JS installation: http://findnerd.com/account#url=/list/view/Node-JS-Installation-and-Create-Your-First-Application-Using-Node-JS/18122/
Following are the steps of installing Express JS:
1) Create a Project folder name "testProject" in var/www/html/
mkdir testProject
2) Go to testProject
cd testProject
and execute the below command. It will install the express and create a node_modules directory in testProject folder.
npm install express --save
3) To check express version.
express --version
4) It will create a folder name test containing express Project structure where we will write our code.
express test
5) Go to test directory
cd test
6) To install all dependencies
npm install
7) It start the server on default port 3000 if it is not already in use.
npm start
8) Finally load the below URL in browser
http://localhost:3000/
Hope it will you.
0 Comment(s)