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

x/fsrouter/deps.ts>http.ServerInit

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

Options for running an HTTP server.

Properties

handler: Handler

The handler to invoke for individual HTTP requests.

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

The handler to invoke when route handlers throw an error.

The default error handler logs and returns the error in JSON format.