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

x/deno/ext/net/lib.deno_net.d.ts>Deno.ListenOptions

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface Deno.ListenOptions
import { type Deno } from "https://deno.land/x/deno@v1.27.1/ext/net/lib.deno_net.d.ts";
const { ListenOptions } = Deno;

Properties

port: number

The port to listen on.

optional
hostname: string

A literal IP address or host name that can be resolved to an IP address. If not specified, defaults to 0.0.0.0.

Note about 0.0.0.0 While listening 0.0.0.0 works on all platforms, the browsers on Windows don't work with the address 0.0.0.0. You should show the message like server running on localhost:8080 instead of server running on 0.0.0.0:8080 if your program supports Windows.