[fix] Use the memory engine by default

This commit is contained in:
indexzero 2011-05-16 22:44:46 -04:00
parent badbb59e3f
commit 87351caac8
2 changed files with 9 additions and 3 deletions

View file

@ -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)

View file

@ -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);
}
};