snyk-config
This is a port of @snyk/config,
an opinionated npm
library which loads config from files and
the environment.
It prefers:
-
environment variables, prefixed with
CONF_
, as literals or JSON -
${CONFIG_SECRET_FILE}
-
config.${SERVICE_ENV}.json
-
config.default.json
-
CONFIG_SECRET_FILE
defaults to./config.secret.json
-
SERVICE_ENV
defaults tolocal
Loaded values are merged, e.g.
config.default.json
:
config.secret.json
:
env:
..will result in: