get-unused-port-in-list

1.1.0 • Public • Published

get-unused-port-in-list

Stability: 2 - Stable

npm Build Status

Description

Run through a list of TCP ports and return one that is not busy

Usage

require('get-unused-port-in-list')([7000, 8000, 9000])
  .then((unusedPort) => {
   // unusedPort port is free (first caught)
  })
  .catch(() => {
   // All ports are busy
  })

Package Sidebar

Install

npm i get-unused-port-in-list

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.84 kB

Total Files

4

Last publish

Collaborators

  • yann_bertrand