1.

What Function Arguments Are Available To Express.js Route Handlers?

Answer»

The arguments available to an Express.js route handler FUNCTION are:

  • req - the request OBJECT
  • res - the response object
  • NEXT (optional) - a function to pass control to ONE of the subsequent route handlers

The third argument may be omitted, but is useful in cases where you have a CHAIN of handlers and you would like to pass control to one of the subsequent route handlers, and skip the current one.

The arguments available to an Express.js route handler function are:

The third argument may be omitted, but is useful in cases where you have a chain of handlers and you would like to pass control to one of the subsequent route handlers, and skip the current one.



Discussion

No Comment Found