From 484ee1e549f680e4f22c228060cc1c141a5845c9 Mon Sep 17 00:00:00 2001 From: chamomind Date: Wed, 29 Nov 2023 22:42:33 +0700 Subject: [PATCH] Init vue and express in same container --- Services/server/src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Services/server/src/app.ts b/Services/server/src/app.ts index 10d2042..b632f10 100644 --- a/Services/server/src/app.ts +++ b/Services/server/src/app.ts @@ -27,6 +27,11 @@ RegisterRoutes(router); app.use(swaggerSpecs.basePath, router); app.use(errorHandler); +app.use(express.static('static')) +app.get('*',(req,res)=>{ + res.sendFile(`${process.cwd()}/static/index.html`) +}) + app.listen(PORT, "0.0.0.0", () => console.log(`[APP] Application is running on http://localhost:${PORT}`), );