For Install

npm i morgan -save -g

Use

// environment
var express = require("express");
var morgan = require("morgan");
var app = express();

// routing
app.get('/', function(req, res){
    res.send('

mind

'); }); // middleware app.use(morgan('dev')); // for HTTP request logger // request port app.listen(5000,function(){ console.log('server still running...'); });

reference: https://github.com/expressjs/morgan