Addressing some issues around dotenv #222
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @goldbergyoni 👋,
Very cool project you are putting together here. It will really help devs!
But I wanted to address some concerns I had about the writing concerning .env files. I've put that in this PR as a work in progress.
I actually think a developer would be MORE likely to endanger their secrets with convict. The pattern of adding
.env
to your.gitignore
file is well established - often built into frameworks. That same pattern is not well established for aconfig.js
file. A less experienced developer is likely to forget to addconfig.js
to their .gitignore file - leaking their secrets. Most of all, GitHub likely won't trigger a warning to the developer when they push up thisconfig.js
like they do for a.env
file.Additionally, some of the arguments for sharing the .env file seem unfairly attributed to .env files. Sharing a config.js file securely between your team has the same problem.
The types issue makes sense. That is a limitation of .env files.