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.

NameRequiredTypeDescription
idYesStringThe id of the route, used in getRouteById method
notFoundNoBooleanWhether or not this route is responsible for display 404 not found pages.
pathYes

Unless registering a global not found route
Stringuse the route-parser module.
handlerYesFunctionThe handler to be called when the route is matched.
loaderYes

If the handler option has a load property it will be used
FunctionSee loaders for more information
methodNoStringThe http method that this route should match, if omitted the route will match any method.

👍

On to Request Object