diff --git a/loop/routes/home.js b/loop/routes/home.js index 0604eb0..4faaf83 100644 --- a/loop/routes/home.js +++ b/loop/routes/home.js @@ -95,6 +95,14 @@ module.exports = function(app, conf, logError, storage, tokBox, statsdClient) { }); }); + + /** + * Checks that the service and its dependencies are healthy. + **/ + app.get("/__lbheartbeat__", function(req, res) { + res.status(200).json({}); + }); + /** * Displays some version information at the root of the service. **/ diff --git a/test/functional_test.js b/test/functional_test.js index da5f4dc..f25276f 100644 --- a/test/functional_test.js +++ b/test/functional_test.js @@ -251,6 +251,19 @@ function runOnPrefix(apiPrefix) { }); }); + + describe("GET /__lbheartbeat__", function() { + it("should return a 200 if everything is ok", function(done) { + supertest(app) + .get(apiPrefix + '/__lbheartbeat__') + .expect(200) + .end(function(err) { + if (err) throw err; + done(); + }); + }); + }); + describe("GET /__heartbeat__", function() { var defaultPushURI = "https://push.services.mozilla.com/"; beforeEach(function() {