Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1004 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 1004 Bytes

nlm-chat nlm-github nlm-node nlm-version

Find an Open Port Build Status

Install

npm install --save find-open-port

Usage

const findPort = require('find-open-port');

findPort().then(port => {
  console.log(`You may now start listening on %d.${port}`);
});

findPort.isAvailable(80).then(available => {
  console.log(`Port 80 is ${available ? 'available' : 'not available'}`);
});