Skip to content

Commit

Permalink
Merge pull request #1 from AirbusAerial/master
Browse files Browse the repository at this point in the history
Adding health check endpoint
  • Loading branch information
wallymathieu authored Dec 11, 2017
2 parents cd8ecf0 + 69748f3 commit 12e2d0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function Nuts(opts) {

this.router.get('/notes/:version?', this.onServeNotes);

this.router.get('/health', this.onHealth);

// Bind API
this.router.use('/api', this.onAPIAccessControl);
_.each(API_METHODS, function(method, route) {
Expand Down Expand Up @@ -95,6 +97,9 @@ Nuts.prototype._init = function() {
});
}

Nuts.prototype.onHealth = function(req, res, next) {
res.sendStatus(200);
}

// Perform a hook using promised functions
Nuts.prototype.performQ = function(name, arg, fn) {
Expand Down

0 comments on commit 12e2d0f

Please sign in to comment.