getconfig
getconfig copied to clipboard
Local is overwriting NODE_ENV
I have these env as json files in my config/ dir:
- default
- dev
- local
- production
- staging
Although I have NODE_ENV set to 'staging', the config 'local' seems to be included to & overwrites the values.
v: 3.1.0
Same on v4.5.0 too
Renaming in to localbox.json works
this is intended behavior, see: https://github.com/HenrikJoreteg/getconfig#where-to-put-your-config-and-what-to-call-it
specifically the list of what configuration files are attempted and the order they're attempted in. each of those files is attempted and layered on top of the previous config layer.
that said, i do think that the local
concept is kind of moot right now given the .env
file support, so i'll likely remove that special case soon.