babysitter
Watches your node.js connections and automatically reconnects them when things fail.
Connections in node.js are flaky by nature - a disconnection will throw a fatal error (unless your code is watching for them), potentially bringing down your entire application. Babysitter transparently catches these failures and automatically attempts to reconnect the problem connection, resulting in a more reliable application.
Babysitter can watch any EventEmitter
that emits connect
and close
events.
Examples
var Babysitter = ; // Let's give the babysitter something to do besides watch tv var sitter = Babysitter // Options to be passed to the connect function host: 'localhost' port: '8000' ); // Babysitter emits connect, close, end, and backoff sitter; sitter;
License
All code licensed under the MIT license.