Skip to content

Commit

Permalink
Merge pull request #38 from teohhanhui/master
Browse files Browse the repository at this point in the history
Add a /ping endpoint
  • Loading branch information
teohhanhui authored Apr 21, 2017
2 parents cf2764b + 1927e71 commit 8d21c90
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 8d21c90

Please sign in to comment.