Direction: Choose the correct option
Q1.
How do you create a custom middleware function that logs each request?
Direction: Choose the correct option
Q2.
What is the role of the body-parser middleware (now part of Express)?
Direction: Choose the correct option
Q3.
Why would you use the cors middleware in an Express app?
Direction: Choose the correct option
Q4.
How do you include third-party middleware like morgan for logging?
Direction: Choose the correct option
Q5.
What does the following custom middleware do? app.use((req, res, next) => { req.requestTime = Date.now(); next(); })
