Skip to main content
Module

x/oak/mod.ts>composeMiddleware

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
function composeMiddleware
import { composeMiddleware } from "https://deno.land/x/oak@v11.1.0/mod.ts";

Compose multiple middleware functions into a single middleware function.

Type Parameters

optional
S extends State = Record<string, any>
optional
T extends Context = Context<S>

Parameters

middleware: Middleware<S, T>[]

Returns

(context: T, next?: () => Promise<unknown>) => Promise<unknown>