random-port

get a random free tcp port and pass to the callback

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
random-port
0.1.08 years ago8 years agoMinified + gzip package size for random-port in KB

Readme

node-random-port
get a free random tcp port and pass to the callback
var random_port = require('random-port');

random_port(console.log); // default will return a port from 15000 to 15099

random_port({from: 20000}, console.log);

random_port({from: 20000, range: 10}, console.log);