Add ping route

This commit is contained in:
Brandon Keepers 2017-06-11 01:04:46 -05:00
parent d680401279
commit 76223a5029
No known key found for this signature in database
GPG Key ID: F9533396D5FACBF6
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ module.exports = function (webhook) {
console.error(err);
res.statusCode = 500;
res.end('Something has gone terribly wrong.');
} else if (req.url.split('?').shift() === '/ping') {
res.end('PONG');
} else {
res.statusCode = 404;
res.end('no such location');