Express can use various middleware for functionalities like authentication, logging, etc. For example, to use the morgan
logging library:
npm install morgan
Then, in app.js
:
const morgan = require('morgan');
app.use(morgan('dev'));
Express can use various middleware for functionalities like authentication, logging, etc. For example, to use the morgan
logging library:
npm install morgan
Then, in app.js
:
const morgan = require('morgan');
app.use(morgan('dev'));
Leave a Reply