Skip to content

jackboberg/safeharbor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

find available port on host machine

Resources

License

Stars

Watchers

Forks

Packages

No packages published