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)
class Server
implements OakServer<NativeRequest>

The oak abstraction of the Deno native HTTP server which is used internally for handling native HTTP requests. Generally users of oak do not need to worry about this class.

Constructors

new
Server(
options: Omit<ServeOptions | ServeTlsOptions, "signal">,
)

Type Parameters

AS extends State = Record<string, any>

Properties

readonly
app: Application<AS>
readonly
closed: boolean

Methods

[Symbol.asyncIterator](): AsyncIterableIterator<NativeRequest>
close(): Promise<void>
listen(): Promise<Listener>

Static Properties

type: "native"

Add Package

deno add jsr:@oak/oak

Import symbol

import { Server } from "@oak/oak/http_server_native";

---- OR ----

Import directly with a jsr specifier

import { Server } from "jsr:@oak/oak/http_server_native";

Add Package

npx jsr add @oak/oak

Import symbol

import { Server } from "@oak/oak/http_server_native";

Add Package

yarn dlx jsr add @oak/oak

Import symbol

import { Server } from "@oak/oak/http_server_native";

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

import { Server } from "@oak/oak/http_server_native";

Add Package

bunx jsr add @oak/oak

Import symbol

import { Server } from "@oak/oak/http_server_native";