a cartoon squirrel holding an acorn

A middleware framework for JavaScript and TypeScript

oak is a middleware framework for handling HTTP requests across Deno, Node.js, Bun and Cloudflare Workers.

deno add @oak/oak
npx jsr add @oak/oak
yarn dlx jsr add @oak/oak
pnpm dlx jsr add @oak/oak
bunx jsr add @oak/oak
import { Application, Router } from "@oak/oak";

const router = new Router();

router.get("/", (ctx) => {
  ctx.response.body = "Hello world";
});

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

app.listen();

Familiar API

oak was inspired by Express.js and koa and originally written for the Deno runtime. This makes it easy to adapt existing approaches with out of the box cross platform support.

See the docs