From 4d6992ddb43905341998d2439c82e9889c39bb81 Mon Sep 17 00:00:00 2001 From: marcel-bitfly <174338434+marcel-bitfly@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:15:17 +0100 Subject: [PATCH] feat(healthz): change route from `frontend` to `(nuxt) backend` To reduce `payload size` for `loadbalancer`, as we do not send useless `html` anymore. The `loadbalancer` checks every `2min` if the `application` is reachable. --- frontend/.vscode/settings.json | 1 + frontend/pages/healthz.vue | 3 --- frontend/server/routes/healthz.ts | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) delete mode 100644 frontend/pages/healthz.vue create mode 100644 frontend/server/routes/healthz.ts diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json index f5e052f34..fbec09fe2 100644 --- a/frontend/.vscode/settings.json +++ b/frontend/.vscode/settings.json @@ -34,6 +34,7 @@ "feature-flags", "git", "git-blame-ignore", + "healthz", "i18n", "mainHeader", "middleware", diff --git a/frontend/pages/healthz.vue b/frontend/pages/healthz.vue deleted file mode 100644 index 04d85e1bd..000000000 --- a/frontend/pages/healthz.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/frontend/server/routes/healthz.ts b/frontend/server/routes/healthz.ts new file mode 100644 index 000000000..40636e584 --- /dev/null +++ b/frontend/server/routes/healthz.ts @@ -0,0 +1,6 @@ +export default defineEventHandler(() => { + // this endpoint is used for the `loadbalancer` to check if the server is up (status 200) + return { + status: 'ok', + } +})