nconf
nconf copied to clipboard
What's the best way to cope with variables that depend on other variables
Say for example I have two variables
{
"port": 3000
"url": "http://site.com:{port}"
}
I'd like that when I call nconf.get("url"), I get "http://site.com:3000".
I tried
nconf.set("url", nconf.get("url").replace(...));
but it seems that once a variable is "loaded" into nconf, it's impossible to override it.
Question 1: can I force nconf.set to override a variable that's already been declared?
Question 2: what's the recommended way to cope with variables that depend on each other?
it looks like i just posted a dup of #197 #187 #166