Skip to content

Commit

Permalink
Add a /ping endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
teohhanhui committed Apr 21, 2017
1 parent cf2764b commit 1927e71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/templates/server.js.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ env = ir.env;
Img = ir.img;
streams = ir.streams;

app.use(function (req, res, next) {
if (req.path === '/ping') {
res.send('pong');
} else {
next();
}
});

app.directory = __dirname;
ir.expressConfig(app);

Expand Down

0 comments on commit 1927e71

Please sign in to comment.