Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add health check/ping endpoint #95

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ functions:
path: /probot/stats
method: get
cors: true
healthCheck:
handler: src/serverless-health-check.handler
events:
- http:
path: /ping
method: get
cors: true
- http:
path: /health-check
method: get
cors: true

# Tasks
processIssueComment:
Expand Down
7 changes: 7 additions & 0 deletions src/serverless-health-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports.handler = async (event, context) => { // eslint-disable-line
// TODO: add real health check
return {
statusCode: 200,
body: 'Service is healthy',
}
}