Skip to content

andrelmlins/choose-port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Choose Port

Choose an available port

npm version License: MIT Build Status Language grade: JavaScript

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

NPM

License

Choose Port is open source software licensed as MIT.