Skip to content

Commit

Permalink
feat: add health check endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiDood committed Dec 4, 2024
1 parent 8079228 commit b7c1a60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ min_machines_running = 0

[[http_service.checks]]
method = "GET"
path = "/"
grace_period = "4s"
interval = "10s"
timeout = "20s"
path = "/health"
grace_period = "3s"
interval = "6s"
timeout = "12s"
7 changes: 7 additions & 0 deletions src/routes/health/+server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import assert from 'node:assert/strict';

export function GET({ locals: { ctx } }) {
assert(typeof ctx !== 'undefined');
ctx.logger.info('health check pinged');
return new Response(null, { status: 200 });
}

0 comments on commit b7c1a60

Please sign in to comment.