0.1.0 • Published 9 years ago

safeharbor v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

safeharbor

version build coverage code climate license

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
})