import { Router } from "https://deno.land/x/oak@v17.1.2/router.ts";
Register middleware to be used on every matched route.
Type Parameters
optional
P extends RouteParams<string> = RouteParams<string>optional
S extends State = RSParameters
middleware: RouterMiddleware<string, P, S>
...middlewares: RouterMiddleware<string, P, S>[]
Register middleware to be used on every route that matches the supplied
path
.
Register middleware to be used on every route that matches the supplied
path
with explicit path parameters.
Type Parameters
P extends RouteParams<string>
optional
S extends State = RSParameters
middleware: RouterMiddleware<string, P, S>
...middlewares: RouterMiddleware<string, P, S>[]
Type Parameters
optional
P extends RouteParams<string> = RouteParams<string>optional
S extends State = RSParameters
middleware: RouterMiddleware<string, P, S>
...middlewares: RouterMiddleware<string, P, S>[]