Fixed maintenance app initialization

This commit is contained in:
Naz 2021-01-28 19:32:27 +13:00 committed by Daniel Lockyer
parent 9bff415572
commit e33599432d
No known key found for this signature in database
GPG Key ID: FFBC6FA2A6F6ABC1

View File

@ -1,25 +1,6 @@
const hbs = require('express-hbs');
const MaintenanceApp = require('@tryghost/maintenance');
const {i18n} = require('../../lib/common');
const logging = require('../../../shared/logging');
const express = require('../../../shared/express');
const config = require('../../../shared/config');
const {servePublicFile, serveFavicon} = require('../site/middleware');
const createHbsEngine = () => {
const engine = hbs.create();
engine.registerHelper('asset', require('../../../frontend/helpers/asset'));
return engine.express4();
};
module.exports = new MaintenanceApp({
logging,
i18n,
express,
viewEngine: createHbsEngine(),
compress: config.get('compress'),
views: config.get('paths').defaultViews,
servePublicFile,
serveFavicon
express
}).app;