Express Hello World Flashcards
1
Q
What is Express middleware?
A
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. The next middleware function is commonly denoted by a variable named next.
2
Q
What is Express middleware useful for?
A
Execute any code.
Make changes to the request and the response objects.
End the request-response cycle.
Call the next middleware function in the stack.
3
Q
How do you mount a middleware with an Express application?
A
.use method
4
Q
Which objects does an Express application pass to your middleware to manage the request/response lifecycle of the server?
A
req, res, next objects