UNPKG

@bolt/build-tools

Version:

Curated collection of front-end build tools in the Bolt Design System.

21 lines (18 loc) 371 B
const portfinder = require('portfinder'); async function getPort(basePort = 8000) { return new Promise((resolve, reject) => { return portfinder .getPortPromise({ port: basePort, }) .then(port => { return resolve(port); }) .catch(err => { return reject(err); }); }); } module.exports = { getPort, };