LogoRobo.js
Packages@robojs/server

findAvailablePort()

Function: findAvailablePort()

function findAvailablePort(options): Promise<FindAvailablePortResult>

Find an available port, starting from the given port and incrementing if necessary

Parameters

ParameterTypeDescription
optionsFindAvailablePortOptionsOptions for finding the port

Returns

Promise<FindAvailablePortResult>

Promise with the available port information

Throws

Error if no available port found within maxAttempts

On this page