nconf
nconf copied to clipboard
Error on load() when config file doesn't exist
Just getting started with this module, cool stuff. It would be nice if load() would return something in err if the config file wasn't found. I can check for existence before I call load(), but this is redundant. Or if I'm missing something being a noob, please inform. My prototype is trying to load config, if it doesn't exist (initial startup, for example) create a default.
+1
+1 !! I burnt a bunch of time on this. Expected an unfound file to throw an error so thought I was doing something else wrong, very annoying.
+1
+1
There's example code here: https://thejsf.wordpress.com/2015/02/08/node-js-application-configuration-with-nconf/ for failing noisily.