_includes/api/en/4x/routing-args.html
| Argument | Description | Default |
|---|---|---|
path | The path for which the middleware function is invoked; can be any of: |
For examples, see Path examples. | '/' (root path) |
| callback | Callback functions; can be:
You can provide multiple callback functions that behave just like middleware, except that these callbacks can invoke next('route') to bypass the remaining route callback(s). You can use this mechanism to impose pre-conditions on a route, then pass control to subsequent routes if there is no reason to proceed with the current route.
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 |