This repository was archived by the owner on Sep 25, 2020. It is now read-only.
This repository was archived by the owner on Sep 25, 2020. It is now read-only.
./config/secrets loading interface and order needs to match the ./config loading interface and order #19
Open
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
, loadconfig/foo.json
- ...
- Profit
Adding secrets, now we have this:
- Load
config/common.json
- If NODE_ENV is set to
foo
, loadconfig/foo.json
- If NODE_ENV is set to
foo
, loadconfig/secrets/secrets-foo.json
...- Unless NODE_ENV is set to
production
, in that caseconfig/secrets/secrets.json
- Unless NODE_ENV is set to
- ...
- 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
, loadconfig/foo.json
- Load
config/secrets/common.json
- If NODE_ENV is set to
foo
, loadconfig/secrets/foo.json
- ...
- Profit
Metadata
Metadata
Assignees
Labels
No labels