Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/keywork/router/mod.ts>Fetcher

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Latest
interface Fetcher
Re-export
import { type Fetcher } from "https://deno.land/x/keywork@v6.2.1/router/mod.ts";

Cloudflare Usage

Events are handled by defining and exporting an object with method handlers that correspond to event names:

export default {
  fetch(request, env, context) {
    return new Response('Hello')
  },
}

In this setup, all incoming requests are classified as 'fetch' events. The fetch handler receives the Request and replies with a Response.

Type Parameters

optional
BoundAliases = { }

Properties

optional
displayName: string

A display name used for debugging and log messages.

fetch: MiddlewareFetch<BoundAliases>