https://github.com/hobbyquaker/nextport
Node.js module to get the next free port
https://github.com/hobbyquaker/nextport
listen port tcp
Last synced: 7 months ago
JSON representation
Node.js module to get the next free port
- Host: GitHub
- URL: https://github.com/hobbyquaker/nextport
- Owner: hobbyquaker
- Created: 2017-08-18T14:21:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-18T14:23:48.000Z (about 8 years ago)
- Last Synced: 2025-02-17T02:45:58.082Z (8 months ago)
- Topics: listen, port, tcp
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nextport
> Node.js module to get the next free port
## Install
```
$ npm install nextport
```## Usage
```javascript
const nextPort = require('nextport');nextPort(2000, port => {
if (port) {
console.log('next free port:', port);
} else {
console.log('no free port >= 2000 found');
}
});```
## License
MIT (c) Sebastian Raff