A simple health monitor server for running health checks periodically.
npm install paramedic
Step 1: Create a new server.
var medic =
Step 2: Load up your tests. There are two callbacks passed to each test:
warn. If you pass an error (or string) as the first argument to
either of these callbacks, the test will fail:
done emits an error,
warn only emits a warning.
var request =medic;medic;
Step 3: Start up the server!
start() returns a request callback for you
to easily plug into an HTTP server, or as an Express route.
var http =server = medicstart;http;
After that, your server should be running on port 8080, similar to this:
You can create "collections" of tests too. These function as reusable
templates, which can then be loaded using the collection's
The server page will update accordingly as tests fail and recover,
but the server also emits
This can be used, for example, to send notifications or automate a recovery.
ready is emitted when the server has started testing.