| Argument | Description | Default |
|---|---|---|
path |
The path for which the middleware function is invoked; can be any of:
|
'/' (root path) |
callback |
Callback functions; can be:
You can provide multiple callback functions that behave just like middleware, except
that these callbacks can invoke When a callback function throws an error or returns a rejected promise, `next(err)` will be invoked automatically. Since router and app implement the middleware interface, you can use them as you would any other middleware function. For examples, see Middleware callback function examples. |
None |