uuport
v1.0.0
Published
Automatically find an available port.
Downloads
2
Readme
const app = require("express")();
const uu = require("uuport");
uu().then(port => {
app.listen(port, () => {
console.log("listening on port " + port);
});
});
const app = require("express")();
const uu = require("uuport");
(async () => {
app.listen(await uu());
})();
const app = require("express")();
const uu = require("uuport");
(async () => {
app.listen(await uu(3000, 5000)); //await uu(min=3000, max=5000);
})();