Question - What is the use of middleware in Node.js?
Answer -
A middleware is a simple function that has the ability to handle incoming requests and outbound response objects. Middleware is used primarily for the following tasks:
• Execution of code (of any type)
• Updation of request and response objects
• Completion of request–response iterations
• Calling the next middleware