Skip to main content
Module

x/superdeno/deps.ts>getFreePort

Super-agent driven library for testing Deno HTTP servers.
Latest
function getFreePort
import { getFreePort } from "https://deno.land/x/superdeno@4.9.0/deps.ts";

Found free port. If the port is not available, returns the port If the port is not available, returns a random available port Requires --allow-net flag

Parameters

port: number

The port number to find: 0 - 1023 WellKnownPorts 1024 - 49151 RegisteredPorts 49152 - 65535 Dynamicand/orPrivatePorts

optional
options: freePortOption = [UNSUPPORTED]

Returns

Promise<number>