|
|
|
@ -180,21 +180,26 @@ function start() {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
async.waterfall([
|
|
|
|
|
async.apply(db.init),
|
|
|
|
|
async.apply(db.checkCompatibility),
|
|
|
|
|
function (next) {
|
|
|
|
|
require('./src/meta').configs.init(next);
|
|
|
|
|
},
|
|
|
|
|
async.apply(db.init),
|
|
|
|
|
function (next) {
|
|
|
|
|
if (nconf.get('dep-check') === undefined || nconf.get('dep-check') !== false) {
|
|
|
|
|
require('./src/meta').dependencies.check(next);
|
|
|
|
|
} else {
|
|
|
|
|
winston.warn('[init] Dependency checking skipped!');
|
|
|
|
|
setImmediate(next);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
|
require('./src/upgrade').check(next);
|
|
|
|
|
var meta = require('./src/meta');
|
|
|
|
|
async.parallel([
|
|
|
|
|
async.apply(db.checkCompatibility),
|
|
|
|
|
async.apply(meta.configs.init),
|
|
|
|
|
function (next) {
|
|
|
|
|
if (nconf.get('dep-check') === undefined || nconf.get('dep-check') !== false) {
|
|
|
|
|
meta.dependencies.check(next);
|
|
|
|
|
} else {
|
|
|
|
|
winston.warn('[init] Dependency checking skipped!');
|
|
|
|
|
setImmediate(next);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
|
require('./src/upgrade').check(next);
|
|
|
|
|
}
|
|
|
|
|
], function (err) {
|
|
|
|
|
next(err);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
|
var webserver = require('./src/webserver');
|
|
|
|
|