version bump and frontend fixes
This commit is contained in:
+10
-3
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user