likeastore / heartbeat

Health monitoring of HTTP services and databases.
109 stars 21 forks source link

Run as middleware #4

Open gtramontina opened 9 years ago

gtramontina commented 9 years ago

How about having heartbeat also available as a connect middleware? This middleware would add a /heartbeat (or something like this) to the stack, but would run the checks upon request, not within a loop.

The rationale behind this is to be able to have something in the app itself that would look things from within.

Perhaps also in the future, have ports of heartbeat to other languages/frameworks, like a rack middleware, for example.

alexbeletsky commented 9 years ago

Hm, that could be cool. I really would like that, so once you ready - please shoot a PR :)