JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 883
  • Score
    100M100P100Q108419F
  • License BSD-3-Clause

Returns a promise for an open port on localhost

Package Exports

  • find-open-port

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (find-open-port) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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'}`);
});