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 Route

The internal abstraction of a route used by the oak Router.

Type Parameters

R extends string
S extends State = Record<string, any>

Properties

methods: HTTPMethods[]

The HTTP methods that this route handles.

The middleware that will be applied to this route.

optional
name: string

An optional name for the route.

options: LayerOptions

Options that were used to create the route.

paramNames: (keyof P)[]

The parameters that are identified in the route that will be parsed out on matched requests.

The path that this route manages.

The regular expression used for matching and parsing parameters for the route.

Add Package

deno add jsr:@oak/oak

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @oak/oak

Import symbol

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

Add Package

yarn dlx jsr add @oak/oak

Import symbol

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

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

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

Add Package

bunx jsr add @oak/oak

Import symbol

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