Colons separate nconf hierarchies, e.g.,
{
"AUTH": {
"ENABLED": true
}
}
is accessed via:
nconf.get("AUTH:ENABLED");
I'd like to override this via environment and/or command line options under npm start
, e.g.,
AUTH:ENABLED=false npm start
This fails under both bash and zsh because of the colon. Escaping the colon with \
doesn't help.
The following also fails under all circumstances (hierarchical or not):
npm start --AUTH:ENABLED=false
How can I pass a hierarchical config value through to nconf/optimist in a way that works?