From 248ceba72b4ba35cd7410117c0ea43e9bc00082e Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Tue, 13 Sep 2016 21:38:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=20adapt=20bootstrap=20file=20be?= =?UTF-8?q?cause=20of=20nconf=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs #6982 - remove load config - remove checkDeprecated - adapt arguments for scheduling init [ci skip] --- core/server/index.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/core/server/index.js b/core/server/index.js index 2fd291dbe5..ffc458bd35 100644 --- a/core/server/index.js +++ b/core/server/index.js @@ -14,7 +14,6 @@ require('./overrides'); // Module dependencies var express = require('express'), - _ = require('lodash'), uuid = require('node-uuid'), Promise = require('bluebird'), i18n = require('./i18n'), @@ -73,15 +72,8 @@ function init(options) { // Initialize Internationalization i18n.init(); - // Load our config.js file from the local file system. - return config.load(options.config).then(function () { - return config.checkDeprecated(); - }).then(function loadApps() { - return readDirectory(config.get('paths').appPath) - .then(function (result) { - config.set('paths:availableApps', result); - }); - }).then(function loadThemes() { + return readDirectory(config.get('paths').appPath).then(function loadThemes(result) { + config.set('paths:availableApps', result); return api.themes.loadThemes(); }).then(function () { models.init(); @@ -169,7 +161,11 @@ function init(options) { // scheduling can trigger api requests, that's why we initialize the module after the ghost server creation // scheduling module can create x schedulers with different adapters - return scheduling.init(_.extend(config.get('scheduling'), {apiUrl: utils.url.apiUrl()})); + return scheduling.init({ + active: config.get('scheduling').active, + path: config.get('paths').schedulingPath, + apiUrl: utils.url.apiUrl() + }); }).then(function () { return ghostServer; });