getaport
v0.0.1
Published
get a free port, now!
Downloads
5
Readme
getaport
Get a random free tcp port.
Usage
var getaport = require('getaport');
getaport(function(err, port){ // get a tcp port for 0.0.0.0
if(e) return console.error('oops!');
console.log('got a port of ' + port);
});
getaport('127.0.0.1', function(err, port){ // get a tcp port for 127.0.0.1
if(e) return console.error('oops!');
console.log('got a port of ' + port);
});