This repository was archived by the owner on Sep 25, 2020. It is now read-only.
Description I think we need to change the current interface of loading secrets in the context of environments.
We used to load config/secrets/secrets.json regardless of NODE_ENV, but after #17 , secrets/secrets.json gets loaded iff NODE_ENV === 'production'
The interface to load the 'normal, non-secret config' is pretty nice:
Load config/common.json
If NODE_ENV is set to foo, load config/foo.json
...
Profit
Adding secrets, now we have this:
Load config/common.json
If NODE_ENV is set to foo, load config/foo.json
If NODE_ENV is set to foo, load config/secrets/secrets-foo.json...
Unless NODE_ENV is set to production, in that case config/secrets/secrets.json
...
Cry
There's no reason to complicate the secrets interface. Why not do this???:
Load config/common.json
If NODE_ENV is set to foo, load config/foo.json
Load config/secrets/common.json
If NODE_ENV is set to foo, load config/secrets/foo.json
...
Profit
cc @sh1mmer @Raynos @mlmorg
Reactions are currently unavailable
I think we need to change the current interface of loading secrets in the context of environments.
We used to load
config/secrets/secrets.jsonregardless of NODE_ENV, but after #17,secrets/secrets.jsongets loaded iff NODE_ENV === 'production'The interface to load the 'normal, non-secret config' is pretty nice:
config/common.jsonfoo, loadconfig/foo.jsonAdding secrets, now we have this:
config/common.jsonfoo, loadconfig/foo.jsonfoo, loadconfig/secrets/secrets-foo.json...production, in that caseconfig/secrets/secrets.jsonThere's no reason to complicate the secrets interface. Why not do this???:
config/common.jsonfoo, loadconfig/foo.jsonconfig/secrets/common.jsonfoo, loadconfig/secrets/foo.jsoncc @sh1mmer @Raynos @mlmorg