-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TechDebt: API: Environment Variables Validation #1425
Conversation
Openshift URLs for the PR Deployment: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1425 +/- ##
==========================================
- Coverage 45.72% 45.70% -0.03%
==========================================
Files 801 802 +1
Lines 21639 21650 +11
Branches 3253 3248 -5
==========================================
Hits 9895 9895
- Misses 11155 11166 +11
Partials 589 589 ☔ View full report in Codecov by Sentry. |
Looks great! |
Openshift URLs for the PR Deployment: |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕊️
Description of Changes
Note: In my previous version
env-config.ts
exported a getter and setter for ENV values. I think the added complexity made it not worthwhile.Now you get and set
process.env
values the regular way with the addition ofprocess.env
being fully typed. The app will crash on start up if the environment variables are not set correctly, still undecided if theloadEnvironmentVariables
function should always exit the process, or only fordevelopment
environments instead.process.env
type to include the inferred zod typeTesting Notes