1.0.3 • Published 8 years ago

strong-wait-till-listening v1.0.3

Weekly downloads
2,742
License
Artistic-2.0
Repository
github
Last release
8 years ago

strong-wait-till-listening

This module provides a utility function to wait until there is a TCP server listening on a given port.

Installation

$ npm install strong-wait-till-listening

Usage

var waitTillListening = require('strong-wait-till-listening');

waitTillListening(
  {
    // optional, defaults to 'localhost'
    host: 'localhost',
    port: 3000,
    timeoutInMs: 20000,
    // optional, defaults to 50
    pollingIntervalInMs: 50
  },
  function waitCallback(err) {
  }
);