You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following interface would be useful for safely determining port numbers for your services.
typePortNumber=number|string// Throw an error if the given `port` number is already in usedeclarefunctionassertPortFree(port: PortNumber): void// Returns an array of port numbers that are not in use. declarefunctionfindPorts(numberOfPorts: number,options: {exclude: PortNumber|PortNumber[]}): number[]// Example of using findPortsconst[apiPort,webPort]=findPorts(2,{exclude: PORT});
The function signatures above assume that we're only ever working with ports on localhost.
Should we support working with ports on other hosts?
Docker Machine runs on a different host than localhost on Windows, for example.
The text was updated successfully, but these errors were encountered:
The following interface would be useful for safely determining port numbers for your services.
The function signatures above assume that we're only ever working with ports on
localhost
.Should we support working with ports on other hosts?
Docker Machine runs on a different host than
localhost
on Windows, for example.The text was updated successfully, but these errors were encountered: