Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fsrouter/deps.ts>http.ServeInit

A file system based router for Deno.
Go to Latest
interface http.ServeInit
implements Partial<Deno.ListenOptions>
import { type http } from "https://deno.land/x/fsrouter@2.11.1/deps.ts";
const { ServeInit } = http;

Additional serve options.

Properties

optional
signal: AbortSignal

An AbortSignal to close the server and all connections.

optional
onError: (error: unknown) => Response | Promise<Response>

The handler to invoke when route handlers throw an error.

optional
onListen: (params: { hostname: string; port: number; }) => void

The callback which is called when the server started listening