https://github.com/karimsa/next-port
grab next available TCP port.
https://github.com/karimsa/next-port
Last synced: 3 months ago
JSON representation
grab next available TCP port.
- Host: GitHub
- URL: https://github.com/karimsa/next-port
- Owner: karimsa
- Created: 2015-03-23T13:47:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-29T20:37:55.000Z (about 9 years ago)
- Last Synced: 2025-03-11T21:04:00.638Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# next-port
grab next available port.
## usage
```javascript
var nextPort = require('next-port')// simple usage; check all ports
// (only check <=1024 if root/admin)
nextPort(function (err, port) { /* ... */ })// specify some options
nextPort({ /* options */ }, function (err, port) { /* ... */ })
```## options
- `lower`: the lower bound to start scan from. (default: 1 if root/admin, 1024 if not)
- `higher`: the higher bound to stop scan at. (default: 65535)
- `protocol`: TCP or UDP.