gimme-port-as-promised gimme-port promise wrapper. var gimmePort = require('gimme-port-as-promised'); gimmePort() .then(function(port) { console.log(port); }) .fail(function(e) { console.error(e); });