Skip to main content
Module

std/http/mod.ts>ServeInit

Deno standard library
Go to Latest
interface ServeInit
implements Partial<Deno.ListenOptions>
Deprecated
Deprecated

(will be removed after 1.0.0) Use Deno.ServeInit instead.

Additional serve options.

import { type ServeInit } from "https://deno.land/std@0.202.0/http/mod.ts";

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