JSPM

  • Created
  • Published
  • Downloads 11903358
  • Score
    100M100P100Q221559F
  • License MIT

A simple tool to find an open port on the current machine

Package Exports

  • portfinder

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 (portfinder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-portfinder Build Status

Installation

  $ [sudo] npm install portfinder

Usage

The portfinder module has a simple interface:

  var portfinder = require('portfinder');

  portfinder.getPort(function (err, port) {
    //
    // `port` is guaranteed to be a free port
    // in this scope.
    //
  });

By default portfinder will start searching from 8000. To change this simply set portfinder.basePort.

Run Tests

  $ npm test

Author: Charlie Robbins

License: MIT/X11