0.0.13 • Published 8 years ago

test-port-provider v0.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

#Test Port Provider

Build Status

Gets listenable ports (beginning from the one you pass) by trying to listen on them.

##Installation

npm install test-port-provider

##Usage

var
  net          = require('net'),
  portProvider = require('test-port-provider');


  var PortProvider = new portProvider(80, '127.0.0.1', true, 100, true);
  var port=PortProvider.getPort();
  var port2=PortProvider.getPort();
  //use in in express or whatever...

API

constructor

/**
 * @param startPort {int} the first port to start scanning
 * @param host {string} IP on which we should listen, default 127.0.0.1
 * @param tryTestPorts{boolean} whether we actually need to test ports or just give increments, default true
 * @param connectTimeout{int} connection timeout in ms, default 500
 * @param log {boolean} whether we need to output logs to console, default false
 * @constructor
 */

###getPort

  /**
   * @name getPort
   * @return {int} port
   */
0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago