You are on page 1of 1

1)check in your system node & npm s/w is installed or not

node -v
npm -v
2)create a folder DemoApp move to this folder (cd)
3) npm --init (this will create package.json)
4)install express package
npm install --save express
5)install exection tool
npm install -g nodemon
6)create index.js page

var express=require('express');
var app=express();
app.get('/',function(req,res){
res.send("hello world");

});

7)execution of express project


add this script in package.json file
"scripts": {
"server": "nodemon server.js"
}
8)for running|starting server

npm run server

nodemon->is a tool which help to restart the nodeJs Server automatically


any modification to your expressJs page it will get updated by itself.

You might also like