compose
compose(
middleware): (context,next?) =>Promise<any>
Defined in: src/middleware.ts:10
Composes a list of middleware into a single function. This is the onion model (Koa-style).
CRITICAL: This must build the chain ONCE, not rebuild it on every request.
Parameters
Section titled “Parameters”middleware
Section titled “middleware”Returns
Section titled “Returns”(
context,next?):Promise<any>
Parameters
Section titled “Parameters”context
Section titled “context”ShokupanContext<unknown>
Returns
Section titled “Returns”Promise<any>