Hetansh Waghela commited on
Commit
4a8127d
·
1 Parent(s): 21b1a11

debug: add env var check endpoint

Browse files
Files changed (1) hide show
  1. apps/api/src/main.ts +10 -0
apps/api/src/main.ts CHANGED
@@ -20,6 +20,16 @@ async function bootstrap() {
20
  return { status: "ok", ts: new Date().toISOString() };
21
  });
22
 
 
 
 
 
 
 
 
 
 
 
23
  // Raw capabilities (NestJS controller returning 500 — unknown framework issue)
24
  fastify.get("/api/capabilities", async () => {
25
  return { capabilities: getCapabilities() };
 
20
  return { status: "ok", ts: new Date().toISOString() };
21
  });
22
 
23
+ // Debug - check env vars
24
+ fastify.get("/api/debug", async () => {
25
+ const keys = ["DATABASE_URL", "DEMO_MODE", "CLERK_SECRET_KEY", "AI_PROVIDER"];
26
+ const env: Record<string, string> = {};
27
+ for (const k of keys) {
28
+ env[k] = process.env[k] ? "SET" : "NOT_SET";
29
+ }
30
+ return { env };
31
+ });
32
+
33
  // Raw capabilities (NestJS controller returning 500 — unknown framework issue)
34
  fastify.get("/api/capabilities", async () => {
35
  return { capabilities: getCapabilities() };