Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️
Contains the core concept of oak, the middleware application. Typical usage is the creation of an application instance, registration of middleware, and then starting to listen for requests.
Example
import { Application } from "jsr:@oak/oak@14/application"; const app = new Application(); app.use((ctx) => { ctx.response.body = "hello world!"; }); app.listen({ port: 8080 });
A class which registers middleware (via .use()
) and then processes
inbound requests against that middleware (via .listen()
).
An event that occurs when the application closes.
An event that occurs when the application starts listening for requests.
Available options that are used when creating a new instance of
Application
.
Options which can be specified when listening.
Interface options when listening on TLS.
The base type of state which is associated with an application or context.
Add Package
deno add jsr:@oak/oak
Import symbol
import * as mod from "@oak/oak/application";
---- OR ----
Import directly with a jsr specifier
import * as mod from "jsr:@oak/oak/application";
Add Package
npx jsr add @oak/oak
Import symbol
import * as mod from "@oak/oak/application";
Add Package
yarn dlx jsr add @oak/oak
Import symbol
import * as mod from "@oak/oak/application";
Add Package
pnpm dlx jsr add @oak/oak
Import symbol
import * as mod from "@oak/oak/application";
Add Package
bunx jsr add @oak/oak
Import symbol
import * as mod from "@oak/oak/application";