-
Notifications
You must be signed in to change notification settings - Fork 4
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
[#175059122] Centralise config read #89
Conversation
Affected stories
Generated by 🚫 dangerJS |
Codecov Report
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
- Coverage 83.94% 83.85% -0.10%
==========================================
Files 44 45 +1
Lines 1489 1505 +16
Branches 124 125 +1
==========================================
+ Hits 1250 1262 +12
- Misses 234 238 +4
Partials 5 5
Continue to review full report at Codecov.
|
lgtm, if you handle the FIXMEs we can proceed and merge it |
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.
lgtm. Maybe we have to check if there are any case of "optional" env variable, and how we can handle it using this approach.
lgtm, why draft ? |
DeleteUserDataActivity/index.ts
Outdated
const cosmosDbName = config.COSMOSDB_NAME; | ||
|
||
const messagesContainer = cosmosdbClient | ||
.database(cosmosDbName) |
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.
Can we use directly the config value?
const cosmosDbName = config.COSMOSDB_NAME; | |
const messagesContainer = cosmosdbClient | |
.database(cosmosDbName) | |
const messagesContainer = cosmosdbClient | |
.database(config.COSMOSDB_NAME) |
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.
lgtm, only check if is better variables aliasing instead using directly the values
This PR introduces the
utils/config
module which aims to be the unique interface for application configuration.Every place in which the application used to directly access env variable has been refactored to use this module instead.