Skip to content

Commit

Permalink
fix(backend): fixed backend routers for images (janus-idp#691)
Browse files Browse the repository at this point in the history
Co-authored-by: Tomas Kral <tkral@redhat.com>
  • Loading branch information
Zaperex and kadel committed Nov 2, 2023
1 parent a78ab97 commit 9e606ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-kangaroos-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

Fixed the ordering of the backend routers so that the `/metrics` and `/healthcheck` endpoints can be accessed in the image when the frontend and backend share the same baseUrl.
13 changes: 6 additions & 7 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@ async function main() {
root: '/api',
router: apiRouter,
});
await addRouter({
name: 'app',
service,
root: '',
router: await app(appEnv),
});
await addRouter({
name: 'healthcheck',
service,
Expand All @@ -269,7 +263,12 @@ async function main() {
root: '',
router: metricsHandler(),
});

await addRouter({
name: 'app',
service,
root: '',
router: await app(appEnv),
});
await service.start().catch(err => {
console.log(err);
process.exit(1);
Expand Down

0 comments on commit 9e606ed

Please sign in to comment.