diff --git a/app.js b/app.js index 1e4969c1a..fc6318d36 100644 --- a/app.js +++ b/app.js @@ -127,19 +127,17 @@ exports.boot = function (next,cluster) { // Load configuration var Config = require(path + "/lib/Config").Config; - app.config = new Config({},function(err) { - - // TODO : Check for error + app.config = new Config(); + app.config.init(); + console.log("App Config is " + app.config); // Load application configuration - theme = app.config.get('themes:front'); + // theme = app.config.get('themes:front'); // Bootstrap application bootApplication(function () { next(app); }); - }); - }; // allow normal node loading if appropriate diff --git a/lib/Config.js b/lib/Config.js index 033468904..12112d7ed 100644 --- a/lib/Config.js +++ b/lib/Config.js @@ -12,7 +12,7 @@ var rootpath = process.cwd() + '/', * @type * @options */ -function Config(options,next) { +function Config(options) { // Defaults this.type = options && options.type ? options.type : 'file'; @@ -24,12 +24,13 @@ function Config(options,next) { // Default to file based on environment this.options = options && options.options ? options.options : { file: this.file }; - // Initialise - this.nconf = require('nconf'); - this.load(function(err) { - next(err); - }); +} +Config.prototype.init = function() { + this.nconf = require('nconf'); + this.load(function(err) { + console.log(err); + }); } /** diff --git a/package.json b/package.json index 8020d432f..aac3d827c 100644 --- a/package.json +++ b/package.json @@ -18,38 +18,38 @@ "tests": "./tests" }, "engines": { - "node": "0.4.x || 0.5.x" + "node": "0.6.x" }, "dependencies": { - "express": "2.4.x", - "connect": "1.6.x", - "ejs": "0.4.x", - "jade": "0.13.x", - "stylus": "0.13.x", - "underscore":"1.1.x", - "mongoose": "2.0.x", - "winston": "0.3.x", + "express": "2.5.x", + "connect": "1.8.x", + "ejs": "0.6.x", + "jade": "0.20.x", + "stylus": "0.23.x", + "underscore":"1.3.x", + "mongoose": "2.5.x", + "winston": "0.5.x", "mongodb": "0.9.x", "connect-form": "0.2.x", - "qs": "0.3.x", - "request":"2.0.1", + "qs": "0.4.x", + "request":"2.9.x", "pool":"0.4.x", "mime":"1.2.x", - "cluster": "0.6.x", + "cluster": "0.7.x", "step": "0.0.x", - "optimist":"0.2.x", - "colors":"0.5.x", - "bcrypt": "0.2.x", + "optimist":"0.3.x", + "colors":"0.6.x", + "bcrypt": "0.5.x", "semver":"1.0.x", - "hook.io":"0.7.x", - "zipfile":"0.2.x", - "rimraf":"1.0.x", - "nconf":"0.2.x", + "hook.io":"0.8.x", + "zipfile":"0.3.x", + "rimraf":"2.0.x", + "nconf":"0.5.x", "async": "0.1.x" }, "devDependencies": { - "expresso": "0.8.x", - "should": "0.2.x" + "expresso": "*", + "should": "*" }, "scripts": { "install" : "bash ./bin/install.sh",