$ npm install express
$ npm install --save express
// npm install express
const express = require('express');
const app = express();
app.get('/', (req, res)=> {
res.send('Hello World');
})
app.listen(3000,()=>{
console.log("starting...");
});
go to the project directory and run in command prompt
npm i express //i stands for install
//for installing globally
npm i express -g
npm install express
const express = require('express');
const app = express();
app.get('/', (req, res)=> {
res.send('Hello World');
})
app.listen(3000,()=>{
console.log("starting...");
});
For npm users:
npm i express
For yarn users:
yarn add express
npm install express@4
npm install --save express mongoose ejs dotenv