Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
interface ServeListenerOptions
Deprecated
Deprecated

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

Additional serve listener options.

import { type ServeListenerOptions } from "https://deno.land/std@0.205.0/http/server.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