Skip to main content
Module

x/superoak/deps.ts>getFreePort

HTTP assertions for Oak made easy via SuperDeno. 🐿 🦕
Go to Latest
function getFreePort
import { getFreePort } from "https://deno.land/x/superoak@4.8.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>