Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/superdeno/test/deps.ts>Oak.ListenOptionsBase

Super-agent driven library for testing Deno HTTP servers.
Latest
interface Oak.ListenOptionsBase
import { type Oak } from "https://deno.land/x/superdeno@4.9.0/test/deps.ts";
const { ListenOptionsBase } = Oak;

Properties

optional
port: number

The port to listen on. If not specified, defaults to 0, which allows the operating system to determine the value.

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.

optional
secure: false
optional
signal: AbortSignal

An optional abort signal which can be used to close the listener.