Closed sree-r-one closed 11 months ago
functions that are executed in the server during request.
const logger = (req, res, next) => { const { method, url } = req; const time = new Date().getFullYear(); console.log(method, url, time); next(); }; app.get("/", logger, (req, res) => { res.send("home"); });
functions that are executed in the server during request.