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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you mount a middleware with an Express application?

A

.use method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly