std/http/mod.ts

Deno standard library
Go to Latest
interface ServeInit
implements Partial<Deno.ListenOptions>
import { type ServeInit } from "https://deno.land/std@0.147.0/http/mod.ts?s=ServeInit";

Additional serve options.

Properties

optional
signal: AbortSignal
[src]

An AbortSignal to close the server and all connections.

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

The handler to invoke when route handlers throw an error.

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

The callback which is called when the server started listening