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.
npm install hiot-wait-for
var waitfor = require('hiot-wait-for');
return waitfor('api.github.com', 443)
.then(() => runApp())
.catch(err => {
// handle error
});
npm install
npm test