Skip to content

Commit

Permalink
chore: add test health handler
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaiSchmid committed May 1, 2022
1 parent 8e050b1 commit 2065892
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/api-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ class APIServer {
}

setupRoutes() {
this.server.get('/healthz', (req, res, next) => {
const redis = plugins.handler.options.db.redis;
console.log(redis);

res.json(200, {
redis: true
});
return next();
});

// Example handler for authentication. You should probably override it
// with the config.plugins['core/http-auth'].url option
this.server.get('/test-auth', (req, res, next) => {
Expand Down

0 comments on commit 2065892

Please sign in to comment.