-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Centralize environment variables (PORT, DATABASE_URL, HORIZON_URL, SOROBAN_RPC_URL, JWT_SECRET, etc.) in src/config and validate required vars at startup. Use a schema (e.g. zod or env schema) so the app fails fast with a clear message if config is missing.
Requirements and context
- Must validate required env on boot
- Support .env files for local dev
- Document all env vars in README or .env.example
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/env-config- Implement changes
- Add
src/config/env.ts(or similar): read process.env, validate required keys, export typed config - Create
.env.examplewith all keys and placeholder values - Update
src/index.tsto use config and exit with message if validation fails
- Add
- Test and commit
- Run with missing env and verify error message; run with valid env and verify app starts
- Example commit message:
feat: env configuration and validation
Guidelines
- No secrets in repo; .env in .gitignore
- Clear documentation
- Timeframe: 96 hours
- Project details: #
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program