/*1* config.js: Default configuration management plugin which attachs nconf to App instances2*3* (C) 2011, Nodejitsu Inc.4* MIT LICENSE5*6*/78var nconf = require('nconf');910//11// ### Name this plugin12//13exports.name = 'config';1415//16// ### function attach (options)17// #### @options {Object} Options for this plugin18// Extends `this` (the application) with configuration functionality19// from `nconf`.20//21exports.attach = function (options) {22options = options || {};23this.config = new nconf.Provider(options);2425//26// Setup a default store27//28this.config.use('literal');29this.config.stores.literal.readOnly = false;30};3132//33// ### function init (done)34// #### @done {function} Continuation to respond to when complete.35// Initalizes the `nconf.Provider` associated with this instance.36//37exports.init = function (done) {38//39// Remark: There should be code here for automated remote40// seeding and loading41//42this.config.load(function (err) {43return err ? done(err) : done();44});45};4647