Google News
logo
Express.js - Interview Questions
What is application-level middleware in Express.js?
The application-level middleware method is used to bind to the app object using app.use() method. It applies on all routes.
//This middleware will execute for each route.  
app.use(function (req, res, next) {  
  console.log('Current Time:', Date.now())  
  next()  
})  
Advertisement