fix(GRO-1544): register health endpoint at /api/health on app
CI / Lint & Typecheck (pull_request) Failing after 13s
CI / Test (pull_request) Failing after 20s
CI / Build (pull_request) Has been skipped
CI / Build & Push Docker Images (pull_request) Has been skipped
CI / Update Infra Image Tags (pull_request) Has been skipped
CI / Lint & Typecheck (pull_request) Failing after 13s
CI / Test (pull_request) Failing after 20s
CI / Build (pull_request) Has been skipped
CI / Build & Push Docker Images (pull_request) Has been skipped
CI / Update Infra Image Tags (pull_request) Has been skipped
Corrected: use app.get("/api/health", ...) instead of api.get("/health", ...).
api is not declared until ~130 lines later — const has no hoisting,
causing TDZ ReferenceError at startup.
Health endpoint registered on app at full path /api/health, before
any auth middleware, so it's reachable from outside the cluster.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -58,8 +58,8 @@ app.use(
|
||||
})
|
||||
);
|
||||
|
||||
// Health check — registered on api before auth middleware so it is reachable at /api/health
|
||||
api.get("/health", (c) => c.json({ status: "ok" }));
|
||||
// Health check — no auth required, registered on app at full path before auth middleware
|
||||
app.get("/api/health", (c) => c.json({ status: "ok" }));
|
||||
|
||||
// Public booking routes — no auth required, must be registered before auth middleware
|
||||
app.route("/api/book", bookRouter);
|
||||
|
||||
Reference in New Issue
Block a user