Know when a server is ready to receive requests. Used in hotel.
npm install server-ready --save
var serverReady =var port = 3000// A server process is spawned here or somewhere else...
How it works?
server-ready will try to connect every
250ms to the specified
port until a connection has been made or timeout has been reached (
20s by default).
serverReady(port[, host][, timeout], cb)
Tries to connect to
MIT - Typicode