midnight
Version:
Web framework for building modern web applications
18 lines (17 loc) • 491 B
JavaScript
;
/**
* @typedef {import('../../../index').App} App
* @typedef {import('http').IncomingMessage} Request
* @typedef {import('http').ServerResponse} Response
* @typedef {() => void} Next
*/
/**
* @param {Request & { app: App }} req
* @param {Response} res
* @param {Next} next
*/
module.exports = function (req, res, next) {
var started = new Date();
next();
req.app.log.info("".concat(new Date() - started, "ms ").concat(req.method, " ").concat(req.url));
};