1.0.0 • Published 9 years ago

port-fallback v1.0.0

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

port-fallback

Start a server on an available port. Tries a random higher port if the requested port is taken.

NPM version Build Status

Getting Started

var portFallback = require('port-fallback'),
    http = require('http'),
    defaultPort = 4000,
    server = http.createServer()

portFallback.listen(server,
  {defaultPort: defaultPort},
  function(err, port) {
    console.log("Listening on "+port)
    // ...
  }
)
1.0.0

9 years ago