std/http/mod.ts

Deno standard library
Go to Latest
function listenAndServe
Deprecated
import { listenAndServe } from "https://deno.land/std@0.147.0/http/mod.ts?s=listenAndServe";

Parameters

config: Partial<Deno.ListenOptions>[src]

The Deno.ListenOptions to specify the hostname and port.

handler: Handler[src]

The handler for individual HTTP requests.

optional
options: ServeInit
[src]

Optional serve options.

Returns

Promise<void>[src]