nconf
nconf copied to clipboard
documentation: please make it clear that a specific type of store is required to `.set` anything
Just a small thing, I was banging my head against the wall for a few minutes trying to figure out why .set() wasn't working at all after changing from a file store to a default store (because I renamed my config file from .json --> .js to allow for comments).
Anyway, I figured out that if I just added .use( 'memory' ), all was well again, but the documentation doesn't really make this clear.
Extending this a bit, it's also not clear what happens if I have multiple stores that I can .save() to and I call .save() (at least in the case where a key is new)
Also a suggestion, allow a file store to read the module.exports if the file extension is .js. Obviously this would disable saving.
You sir are a life saver! Been going crazy with that!
This is not very clear...