iloire / watchmen

A simple node.js service monitor
MIT License
941 stars 195 forks source link

Combine server.js and app.js #5

Closed rc1 closed 12 years ago

rc1 commented 12 years ago

It would be great to have these combined. This way it can run on the heroku free tier for example.

I've done a quick proof of concept, which is quite a hack. It does work, but there is a circular reference in 'host' in watchmen.get_hosts(redis, config.hosts, function (err, hosts){. I'm just deleting the reference.

Thanks, great app.

iloire commented 12 years ago

Thanks for your feedback. I like both processes (the actual daemon and the reporting app) to run independently, but that's a good point about heroku.

iloire commented 11 years ago

Actually, the solution is pretty simple: just add this line to server.js:

require('./webserver/app');

so you can launch the webserver app in the same process as the monitor.