Open genu opened 4 years ago
Env files are not commited to repo rather created or supplied from another source.
The current flow is that the .env
files are required to be passed in though, is it not?
If you don't pass an .env
file to the EasyConfig Module, it will throw an error.
The expected operation is that if the .env
file isn't present, the library will try to access the host's environment variables.
This is how nestjs-config works.
Currently this library does not work in production!
This is more design related.
Current behavior is that you must pass an env file to load through the
path
property.However, in a production environment, it is recommended that the
.env
NOT be committed to the repository, as per https://github.com/motdotla/dotenv#should-i-commit-my-env-filewe're using
dotenv()
under the hood, so I think that there should be a fall back case where if there is no path that is passed in,dotenv
should just load the env variables directly from the system (which is the recommended way, anyway).Any thoughts?