choose-port
v0.3.2
Published
Choose an available port
Downloads
46
Readme
Choose Port
Choose an available port
Install
npm install choose-port
or
yarn add choose-port
Usage
Call Async
const choosePort = require('choose-port');
choosePort(8000, '127.0.0.1', portValid => {
console.log('Chosen port:', portValid);
});
Call Sync
const { choosePortSync } = require('choose-port');
const portValid = choosePortSync(8000, '127.0.0.1');
console.log(portValid);
NPM Statistics
Download stats for this NPM package
License
Choose Port is open source software licensed as MIT.