Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/levo/templates/new-project/lib/lib.deno_runtime.d.ts>Deno.listen

Server side rendering with The Elm Architecture in Deno
Latest
function Deno.listen
import { Deno } from "https://deno.land/x/levo@v0.0.27/templates/new-project/lib/lib.deno_runtime.d.ts";
const { listen } = Deno;

Listen announces on the local transport address.

const listener1 = Deno.listen({ port: 80 })
const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 })
const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 });
const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" });

Requires allow-net permission.

Parameters

options: ListenOptions & { transport?: "tcp"; }