Skip to content

Commit 5ccac3d

Browse files
update /healthz endpoint to return a JSON payload (#402)
Co-authored-by: Chirag Jain <jain.chirag925@gmail.com>
1 parent d7015fd commit 5ccac3d

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.changeset/lemon-lines-laugh.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@truefoundry/trueforge": patch
3+
---
4+
5+
Update /healthz to return JSON status and package version
6+

‎docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ services:
7070
condition: service_healthy
7171
redis:
7272
condition: service_healthy
73-
# Probes GET /healthz (plain text OK!); node is already in the image.
73+
# Probes GET /healthz; node is already in the image.
7474
healthcheck:
7575
test:
7676
[

‎packages/trueforge/src/app.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export function createServerApp<TTransaction>(deps: ServerDeps<TTransaction>) {
167167

168168
app.use('*', createRequestBodyLimitMiddleware(configuration.MAX_REQUEST_BODY_BYTES));
169169

170-
app.get('/healthz', c => c.text('OK!'));
170+
app.get('/healthz', c => c.json({ status: 'ok', version: PACKAGE_VERSION }));
171171

172172
app.route('/api/v1/auth', createAuthRouter({ oidcClient: deps.oidcClient, logger: deps.logger }));
173173
app.route(

0 commit comments

Comments
 (0)