nconf
nconf copied to clipboard
[Question/issue] How to load hierarchical settings from env
Hi,
I've been trying to combine dotenv
with nconf
to securely store sensitive settings for local development.
In short, a .env
file, ignored from source control, would contain application settings containing sensitive information such as credentials for 3rd-party authentication.
However, I'm facing a wall where it does seem like I can override any setting that would be nested within another property if I combine both env
and file
providers, where env
values would override the values found in the file
that serves as a baseline.
I've set the a Node.JS Stackblitz sample as a proof of concept to illustrate this situation.
I'm uncertain whether this is a bug or if it would be as designed. If you have another course of action to suggest, I'm open to any suggestions here to fulfill my original goal.
Thank you for your collaboration! 😄