Route
Holds methods to handle routes and controllers.
Usage#
use#
app.route.use(...middleware: ((req,res,next)=>void | typeof Middleware)[]): this#
add a global middleware to app more
error#
app.route.use(...middleware: ((err,req,res,next)=>void | typeof Middleware)[]): this#
add a global error middleware to app more
hooks#
app.route.hooks: Hooks#
get request hooks more
getRoute#
getRoute(path: string, method: string): Route<IController>#
get route by a path and method
addRoute#
app.route.addRoute(route: Route<IController>)#
add new route
addRouteFromClass#
app.route.addRouteFromClass(fn: Function)#
add new route from a class