1.5.2 • Published 20 days ago

ensure-port v1.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
20 days ago

Ensure Port

Build Status

Makes sure you get an available port.

Installation

npm i ensure-port
yarn add ensure-port

Usage

import { Ports } from 'ensure-port';

const ports = new Ports({
  startPort: 8000,
  endPort: 9000,
});

const port = await ports.ensure(); // This would be a random port between 8000 and 9000 that is not used (validated again file-system and http server)

// When you finish - remove watcher
await ports.dispose();

How does it work?

It saves inside your node_modules a directory that contain all the ports that are in use. This is why it works in parallel.

License

MIT

Contributing

Feel free to fork and create pull requests!

1.5.2

20 days ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.3.2

2 years ago

1.2.3

2 years ago

1.3.1

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago