diff --git a/lib/nconf.js b/lib/nconf.js index cadb34e..39d1a35 100644 --- a/lib/nconf.js +++ b/lib/nconf.js @@ -9,9 +9,14 @@ var Provider = require('./nconf/provider').Provider, nconf = module.exports = Object.create(Provider.prototype); // -// ### Version 0.1.7 :: 4/20/2011 +// Use the memory engine by default. // -nconf.version = [0, 1, 7]; +nconf.use('memory'); + +// +// ### Version 0.1.9 :: 5/16/2011 +// +nconf.version = [0, 1, 9]; // // ### function path (key) diff --git a/lib/nconf/provider.js b/lib/nconf/provider.js index 9b755be..ee0b4db 100644 --- a/lib/nconf/provider.js +++ b/lib/nconf/provider.js @@ -9,6 +9,7 @@ var stores = require('./stores'); var Provider = exports.Provider = function (options) { options = options || {}; + this.store = stores.create(options.type || 'memory', options); }; // @@ -20,7 +21,7 @@ var Provider = exports.Provider = function (options) { // Provider.prototype.use = function (type, options) { if (!this.store || type.toLowerCase() !== this.store.type) { - this.store = new stores.create(type, options); + this.store = stores.create(type, options); } };