Express JS

Install Express JS and generator

Use the following command to install express:

  • Express installation
    • npm install express
  • Express generator installation
    • npm install express-generator -g
  • Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
  • To test the installation use following command:
    • express –version

Screen Shot 2016-07-09 at 11.08.24 PMScreen Shot 2016-07-09 at 11.10.55 PM


Create an app

  • express [your-app]

Screen Shot 2016-07-09 at 11.20.00 PM.png

  • Install required node modules
    • npm install

Screen Shot 2016-07-09 at 11.38.36 PM

  • Start the application
    • npm start
  • Open browser and enter localhost:3000. You should see the following:

Screen Shot 2016-07-09 at 11.52.17 PM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s