Find and bind to free port in restify/express/connect.
Find a free port to which to bind your restify/express/http server.
$ npm install findandbind
var app = restify; // or app = express(), etc// ... do my configuration of appvar findandbind = ;;
findandbind starts checking at
1024, the first user port.
To start checking at a different port: