nconf icon indicating copy to clipboard operation
nconf copied to clipboard

documentation: please make it clear that a specific type of store is required to `.set` anything

Open ghost opened this issue 11 years ago • 2 comments

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.

ghost avatar Feb 15 '14 05:02 ghost

You sir are a life saver! Been going crazy with that!

skysteve avatar Feb 25 '15 20:02 skysteve

This is not very clear...

Offirmo avatar Feb 27 '15 17:02 Offirmo