1.0.1 • Published 8 months ago

find-a-port v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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