adspace
Answer Posted / Ranjna Jaiswal
Middleware are functions that have access to the request object (req), the response object (res), and the next middleware function in the application’s request-response cycle. To use middleware, you need to add them to your Express application using the app.use() method.n```javascriptnconst express = require('express');nconst app = express();napp.use(function (req, res, next) {n // your code heren next();n});n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers