import { Router } from "https://deno.land/x/oak@v12.1.0/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>[]