Skip to main content

ServeOptions

interface Deno.ServeOptions

Options which can be set when calling Deno.serve.

Type Parameters Jump to heading

Properties Jump to heading

optional
Jump to headingsignal: AbortSignal

An AbortSignal to close the server and all connections.

optional
Jump to headingonError: (error: unknown) => Response | Promise<Response>

The handler to invoke when route handlers throw an error.

optional
Jump to headingonListen: (localAddr: Addr) => void

The callback which is called when the server starts listening.

Back to top