Ghost/core/frontend/services/apps/index.js
Hannah Wolfe 7e0c71509b Moved apps service to frontend
- App service is for our internal frontend apps
- This is a very straightforward move as this truly belongs to frontend
2020-03-23 19:43:01 +00:00

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')
}));
});
}
};