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

x/frugal/docs/dep/std/http.ts>ServerInit

A frugal web framework
Go to Latest
interface ServerInit
implements Partial<Deno.ListenOptions>
import { type ServerInit } from "https://deno.land/x/frugal@0.5.0/docs/dep/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.