Skip to main content
Module

x/enzastdlib/vendor/@deno-std-http.ts>ServerInit

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
interface ServerInit
implements Partial<Deno.ListenOptions>
import { type ServerInit } from "https://deno.land/x/enzastdlib@v0.0.4/vendor/@deno-std-http.ts";

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.