The route object consists of the following properties;
Not Found Routes
Multiple not found routes can be registered, the one that matches and has the deepest path will be used.
Not found routes are all suffixed with a catchall, so registering both / and /admin is possible.
Name | Required | Type | Description |
---|---|---|---|
id | Yes | String | The id of the route, used in getRouteById method |
notFound | No | Boolean | Whether or not this route is responsible for display 404 not found pages. |
path | Yes Unless registering a global not found route | String | use the route-parser module. |
handler | Yes | Function | The handler to be called when the route is matched. |
loader | Yes If the handler option has a load property it will be used | Function | See loaders for more information |
method | No | String | The http method that this route should match, if omitted the route will match any method. |
On to Request Object