freeport Find a free port. freeport() .then(port => { console.log(port) }) .catch(err => { console.error(err) })