Skip to content

dewe/waitfor-connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

waitfor-connection

Promised waiting for host and TCP port to become available. It's like the node version of the wait-for-it bash script — useful for synchronizing the start-up of interdependent services, such as linked docker containers.

Install

npm install waitfor-connection

Usage

var waitfor = require('waitfor-connection');

return waitfor('api.github.com', 443)
  .then(() => spinUpApplication())
  .catch(err => console.error(err));

Tests

npm install
npm test

About

Promised waiting for host to become available

Resources

License

Stars

Watchers

Forks

Packages

No packages published