Celtrix
Celtrix copied to clipboard
[FEATURE] Validate environment variables when the generated API starts
Description
apps/api/src/env.ts loads the root .env, but a missing DATABASE_URL or a non-numeric PORT only shows up later as an obscure ORM or network error.
Proposed solution
- After loading
.env, check required variables for the chosen stack (for exampleDATABASE_URL,PORT,DIRECT_URLfor Supabase) - Print one clear message listing what is missing or invalid, with a hint to copy
.env.example - Exit with code 1 before starting the server
Acceptance criteria
- [ ] Missing or invalid values fail fast with a readable message
- [ ] Valid configs start exactly as before
- [ ] Works for Express, Hono, and Fastify
Please assign me
Hello Pratik Damas, Could you please assign this issue to me? I can work on it and resolve it.