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
var Babysitter = ;// Let's give the babysitter something to do besides watch tvvar sitter = Babysitter// Options to be passed to the connect functionhost: 'localhost'port: '8000');// Babysitter emits connect, close, end, and backoffsitter;sitter;
All code licensed under the MIT license.