Skip to main content

@oak/acorn@1.1.1
Built and signed on GitHub Actions

A focused RESTful server framework 🌰

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
4 days ago (1.1.1)
interface CloudflareFetchHandler

The interface that defines the Cloudflare Worker fetch handler.

Type Parameters

Env extends Record<string, string> = Record<string, string>

Call Signatures

A method that is compatible with the Cloudflare Worker Fetch Handler and can be exported to handle Cloudflare Worker fetch requests.

Example

import { Application } from "@oak/oak";

const app = new Application();
app.use((ctx) => {
  ctx.response.body = "hello world!";
});

export default { fetch: app.fetch };

Add Package

deno add jsr:@oak/acorn

Import symbol

import { type CloudflareFetchHandler } from "@oak/acorn";

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @oak/acorn

Import symbol

import { type CloudflareFetchHandler } from "@oak/acorn";

Add Package

yarn dlx jsr add @oak/acorn

Import symbol

import { type CloudflareFetchHandler } from "@oak/acorn";

Add Package

pnpm dlx jsr add @oak/acorn

Import symbol

import { type CloudflareFetchHandler } from "@oak/acorn";

Add Package

bunx jsr add @oak/acorn

Import symbol

import { type CloudflareFetchHandler } from "@oak/acorn";