safeharbor
v0.1.0
Published
find available port on host machine
Downloads
12
Readme
safeharbor
Find available port on host machine
Install
npm install safeharbor
Usage
const Safeharbor = require('safeharbor')
Safeharbor(function (err, available) {
// available is the first available port between 1024 and 9999
// or undefined
})
Safeharbor(8080, function (err, available) {
// available is `8080` if the port is available
// or undefined
})
Safeharbor(8080, 8089, function (err, port) {
// available is the first available port between 8080 and 8089
// or undefined
})