app.use(function (req, res, next) { console.log(req.?, 'routename'); next(); }); Actually how can I get the name of the router?
app.use(function (req, res, next) { console.log(req.?, 'routename'); next(); }); Actually how can I get the name of the router?
Source: https://ru.stackoverflow.com/questions/527406/
All Articles
req.routeis considered to select a path handler, which is not necessary to know at the time of executing the code insideapp.use(), judging by the fact that it is not there. - Aleksei Zabrodskii