find-a-port
v1.0.1
Published
Get an available port.
Downloads
4
Maintainers
Readme
find-a-port
Get an available [TCP port]
Install
npm install find-a-port
Usage
import findAvailablePort from 'find-a-port';
console.log(await findAvailablePort());
//=> 49749
Pass in a desired port:
import findAvailablePort from 'find-a-port';
console.log(await findAvailablePort(4321));
// Will use 4321 if available, if not get a random port