x/oak/middleware/serve.ts

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
function route
import { route } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v17.1.2/middleware/serve.ts?s=route";

Wrap a handler function to generate middleware that can be used with an oak Router. This allows the handler to deal with a Fetch API standard {@link Request} and return a standard {@link Response}.

Type Parameters

R extends string[src]
P extends RouteParams<R>[src]
S extends State[src]

Parameters

middleware: ServeRouterMiddleware<R, P, S>[src]