arnaucube
arnaucube/socketioMEANseedPublic Self-hosted repository
socketioMEANseed/www/node_modules/portfinder/README.md
www/node_modules/portfinder/README.mdRaw
 1# node-portfinder [![Build Status](https://api.travis-ci.org/indexzero/node-portfinder.svg)](https://travis-ci.org/indexzero/node-portfinder)
 2
 3## Installation
 4
 5### Installing npm (node package manager)
 6``` bash
 7  curl http://npmjs.org/install.sh | sh
 8```
 9
10### Installing node-portfinder
11``` bash
12  $ [sudo] npm install portfinder
13```
14
15## Usage
16The `portfinder` module has a simple interface:
17
18``` js
19  var portfinder = require('portfinder');
20
21  portfinder.getPort(function (err, port) {
22    //
23    // `port` is guaranteed to be a free port
24    // in this scope.
25    //
26  });
27```
28
29By default `portfinder` will start searching from `8000`. To change this simply set `portfinder.basePort`.
30
31## Run Tests
32``` bash
33  $ npm test
34```
35
36#### Author: [Charlie Robbins][0]
37#### License: MIT/X11
38[0]: http://nodejitsu.com