mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
7e0c71509b
- App service is for our internal frontend apps - This is a very straightforward move as this truly belongs to frontend
22 lines
799 B
JavaScript
22 lines
799 B
JavaScript
const debug = require('ghost-ignition').debug('services:apps');
|
|
const Promise = require('bluebird');
|
|
const common = require('../../../server/lib/common');
|
|
const config = require('../../../server/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) {
|
|
common.logging.error(new common.errors.GhostError({
|
|
err: err,
|
|
context: common.i18n.t('errors.apps.appWillNotBeLoaded.error'),
|
|
help: common.i18n.t('errors.apps.appWillNotBeLoaded.help')
|
|
}));
|
|
});
|
|
}
|
|
};
|