Skip to content

Commit

Permalink
feat(backend): add healthcheck endpoint (janus-idp#567)
Browse files Browse the repository at this point in the history
* feat(backend): add healthcheck endpoint

* Adding Changeset and fixing code smell
  • Loading branch information
jesuino committed Oct 6, 2023
1 parent f8482bf commit fa74ef6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-rocks-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': minor
---

Added `healthcheck` endpoint
7 changes: 7 additions & 0 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
loadBackendConfig,
notFoundHandler,
useHotMemoize,
createStatusCheckRouter,
ServiceBuilder,
} from '@backstage/backend-common';
import { TaskScheduler } from '@backstage/backend-tasks';
Expand Down Expand Up @@ -288,6 +289,12 @@ async function main() {
root: '',
router: await app(appEnv),
});
await addRouter({
name: 'healthcheck',
service,
root: '',
router: await createStatusCheckRouter(appEnv),
});

// Optional routers
await addRouter({
Expand Down

0 comments on commit fa74ef6

Please sign in to comment.