From c0caecd31703f48dba2fd80c9bd5ca20e62a94c9 Mon Sep 17 00:00:00 2001 From: TwoDCube <2dcube01@gmail.com> Date: Mon, 7 Feb 2022 02:46:27 +0100 Subject: [PATCH] hack: not render diaktoll on server side --- angular.json | 5 ++++- apps/frontend/server.ts | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/angular.json b/angular.json index 8be0f5dd4..1aec2e664 100644 --- a/angular.json +++ b/angular.json @@ -141,7 +141,10 @@ "outputPath": "dist/frontend/server", "main": "apps/frontend/server.ts", "tsConfig": "apps/frontend/tsconfig.server.json", - "externalDependencies": ["@firebase/firestore"] + "externalDependencies": [ + "@firebase/firestore", + "canvas" + ] }, "configurations": { "production": { diff --git a/apps/frontend/server.ts b/apps/frontend/server.ts index 46ab3f274..73e7b1932 100644 --- a/apps/frontend/server.ts +++ b/apps/frontend/server.ts @@ -35,6 +35,10 @@ export function app(): express.Express { }) ) + server.get('/misc/diaktoll', (req, res) => { + res.sendFile(distFolder + '/index.html'); + }); + // All regular routes use the Universal engine server.get('*', (req, res) => { res.render(indexHtml, { req, providers: [{ provide: APP_BASE_HREF, useValue: req.baseUrl }] })