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
8 months ago (16.0.0)
interface ServerConstructor

The abstract constructor interface that custom servers need to adhere to when using with an Application.

Type Parameters

T extends ServerRequest

Properties

prototype: OakServer<T>
optional
type:
"native"
| "node"
| "bun"

Methods

new<AS extends State = Record<string, any>>(
app: Application<AS>,
options: Omit<ServeOptions | ServeTlsOptions, "signal">,
): OakServer<T>

Add Package

deno add jsr:@oak/oak

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @oak/oak

Import symbol

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

Add Package

yarn dlx jsr add @oak/oak

Import symbol

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

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

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

Add Package

bunx jsr add @oak/oak

Import symbol

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