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