Middleware objects allow encapsulation of middleware along with the ability to initialize the middleware upon listen.
handleRequest(): Promise<unknown> | unknown
The method to be called to handle the request.
A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️
Middleware objects allow encapsulation of middleware along with the ability to initialize the middleware upon listen.
handleRequest(): Promise<unknown> | unknown
The method to be called to handle the request.
Add Package
deno add jsr:@oak/oak
Import symbol
import { type MiddlewareObject } from "@oak/oak/middleware";
---- OR ----
Import directly with a jsr specifier
import { type MiddlewareObject } from "jsr:@oak/oak/middleware";
Add Package
npx jsr add @oak/oak
Import symbol
import { type MiddlewareObject } from "@oak/oak/middleware";
Add Package
yarn dlx jsr add @oak/oak
Import symbol
import { type MiddlewareObject } from "@oak/oak/middleware";
Add Package
pnpm dlx jsr add @oak/oak
Import symbol
import { type MiddlewareObject } from "@oak/oak/middleware";
Add Package
bunx jsr add @oak/oak
Import symbol
import { type MiddlewareObject } from "@oak/oak/middleware";