You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ node test
{ host: 'localhost', port: 3000 }
$ node test --database:port 8080
{ port: 8080 }
As you can see, the entire database config object is getting clobbered when just one property is overridden. I would have expected just the single property to change/merge.
Is there another way to achieve this?
The text was updated successfully, but these errors were encountered:
$ node test
localhost
3000
$ node test --database:port 8080
localhost
8080
Which does not seem to match with the clobbering behaviour above (although it does match what I expected).
Note: I want to pass the config objects (ie, database) around, as opposed to nconf itself, so I'd prefer not to have to use the colon syntax everywhere
I agree that doesn't seem right. It's probably short-circuiting on objects instead of continuing down the hierarchy, which makes sense given that this is a special case.
Here's a simple test case to illustrate what I mean.
test.json
:test.js
:Then run using:
As you can see, the entire
database
config object is getting clobbered when just one property is overridden. I would have expected just the single property to change/merge.Is there another way to achieve this?
The text was updated successfully, but these errors were encountered: