Is your feature request related to a problem? Please describe.
If required environment variables are missing or incorrectly configured, the server may fail unexpectedly or throw unclear runtime errors. This can make setup difficult for new contributors and developers.
Describe the solution you'd like
Add a startup validation system that checks whether all required environment variables are present before the server starts.
Suggested improvements:
- Validate required
.env variables
- Show clear error messages for missing variables
- Stop server startup if critical variables are absent
- Keep implementation lightweight and easy to maintain
Example:
MONGO_URI missing
JWT_SECRET missing
Describe alternatives you've considered
Currently, missing variables may only be discovered when a related feature breaks. Early validation would improve the developer experience and debugging process.
Additional Context
This would be a beginner-friendly backend improvement and helpful for contributors setting up the project locally.
Is your feature request related to a problem? Please describe.
If required environment variables are missing or incorrectly configured, the server may fail unexpectedly or throw unclear runtime errors. This can make setup difficult for new contributors and developers.
Describe the solution you'd like
Add a startup validation system that checks whether all required environment variables are present before the server starts.
Suggested improvements:
.envvariablesExample:
MONGO_URI missingJWT_SECRET missingDescribe alternatives you've considered
Currently, missing variables may only be discovered when a related feature breaks. Early validation would improve the developer experience and debugging process.
Additional Context
This would be a beginner-friendly backend improvement and helpful for contributors setting up the project locally.