mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
15d9a77092
* moved `server/config` to `shared/config` * updated config import paths in server to use shared * updated config import paths in frontend to use shared * updated config import paths in test to use shared * updated config import paths in root to use shared * trigger regression tests * of course the rebase broke tests
23 lines
824 B
JavaScript
23 lines
824 B
JavaScript
const debug = require('ghost-ignition').debug('services:apps');
|
|
const Promise = require('bluebird');
|
|
const {logging, i18n} = require('../../../server/lib/common');
|
|
const errors = require('@tryghost/errors');
|
|
const config = require('../../../shared/config');
|
|
const loader = require('./loader');
|
|
|
|
module.exports = {
|
|
init: function () {
|
|
debug('init begin');
|
|
const appsToLoad = config.get('apps:internal');
|
|
|
|
return Promise.map(appsToLoad, appName => loader.activateAppByName(appName))
|
|
.catch(function (err) {
|
|
logging.error(new errors.GhostError({
|
|
err: err,
|
|
context: i18n.t('errors.apps.appWillNotBeLoaded.error'),
|
|
help: i18n.t('errors.apps.appWillNotBeLoaded.help')
|
|
}));
|
|
});
|
|
}
|
|
};
|