Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.ServeOptions

interface ServeOptions extends Partial<Deno.ListenOptions> {
onError?: (error: unknown) => Response | Promise<Response>;
onListen?: (params: {
hostname: string;
port: number;
}
) => void
;
signal?: AbortSignal;
}

§Extends

§Properties

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

The handler to invoke when route handlers throw an error.

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

The callback which is called when the server started listening

§
signal?: AbortSignal
[src]

An AbortSignal to close the server and all connections.