Skip to main content
This release is 6 versions behind 17.1.3 — the latest version of @oak/oak. Jump to latest

@oak/oak@16.0.0
Built and signed on GitHub Actions

A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️

This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
7 months ago (16.0.0)
interface RouterOptions

Options which can be specified when creating a new instance of a Router.

Properties

optional
methods: HTTPMethods[]

Override the default set of methods supported by the router.

optional
prefix: string

Only handle routes where the requested path starts with the prefix.

Override the request.url.pathname when matching middleware to run.

Determines if routes are matched in a case sensitive way. Defaults to false.

optional
strict: boolean

Determines if routes are matched strictly, where the trailing / is not optional. Defaults to false.

Add Package

deno add jsr:@oak/oak

Import symbol

import { type RouterOptions } from "@oak/oak";

---- OR ----

Import directly with a jsr specifier

import { type RouterOptions } from "jsr:@oak/oak";

Add Package

npx jsr add @oak/oak

Import symbol

import { type RouterOptions } from "@oak/oak";

Add Package

yarn dlx jsr add @oak/oak

Import symbol

import { type RouterOptions } from "@oak/oak";

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

import { type RouterOptions } from "@oak/oak";

Add Package

bunx jsr add @oak/oak

Import symbol

import { type RouterOptions } from "@oak/oak";