find-a-port

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i find-a-port

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.04 kB

Total Files

4

Last publish

Collaborators

  • guillermo-smg