Installing Express with nodejs

Installing Express with nodejs project dependency

  1. Create project folder and open the folder using  command prompt
  2. execute the following  commands
  3. Create project using  npm init command


4. Now install Express in the app directory and save it in the dependencies list using :-  npm install express --save (To install Express temporarily and not add it to the dependencies list, omit the --save option)


you can see the express is added to the project dependency

5. You can install the following supporting libraries also

body-parser – This is a node.js middleware for handling JSON, Raw, Text and URL encoded form data.

cookie-parser – Parse Cookie header and populate req.cookies with an object keyed by the cookie names.

multer – This is a node.js middleware for handling multipart/form-data.

6. Create a sample code

7 Run the server using node index.js open in your browser 




There a node package nodemon, “Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development”

Running our project with nodemon



How to use express generator for creating project

Author: bm on August 1, 2016
Category: NodeJs

Your comment:

Your Name


Last articles