version bump and frontend fixes

This commit is contained in:
peter
2020-04-02 09:51:46 +02:00
parent 1cd453b382
commit c888bf4514
49 changed files with 670 additions and 669 deletions
+10 -3
View File
@@ -13,15 +13,22 @@ global['document'] = win.document;
global['alert'] = console.log
global['XMLHttpRequest'] = require('xmlhttprequest').XMLHttpRequest;
export async function attachExpress(app, staticDir = "./dist", loggerService = console) {
export async function attachExpress(app, staticDir = "./dist", logger = console) {
const STATIC_FOLDER = resolve(process.cwd(), staticDir);
enableProdMode();
const loggerService = {
warn: (...args) => logger.error(...args),
error: (...args) => logger.warn(...args),
log: (...args) => logger.info(...args),
table: (...args) => logger.info(...args),
collapsed: (msg, type, ...args) => loggerService[type](msg, ...args)
}
const bundle = require(staticDir + '/server/main');
const ServerApiService = bundle.ServerApiService
const serviceObj = new ServerApiService(loggerService)
const serviceObj = new ServerApiService(logger)
await serviceObj.initialize()
app.set('view engine', 'html');