From 427c016bd8c78a4a52361c0b5cdfa0b55203e4af Mon Sep 17 00:00:00 2001 From: Agent Date: Tue, 14 Jul 2026 17:48:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8E=E7=AB=AF=E6=B7=BB=E5=8A=A0expr?= =?UTF-8?q?ess.static=E6=8F=90=E4=BE=9B=E5=89=8D=E7=AB=AFdist=EF=BC=8C9110?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E5=8F=AF=E8=AE=BF=E9=97=AE=E7=BD=91=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/index.js b/backend/src/index.js index 694dfee..b56b40f 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -18,6 +18,9 @@ app.use(limiter); apiRoutes(app); +// 提供前端静态文件(Docker 镜像中 dist 位于 /app/dist) +app.use(express.static('dist')); + app.get('/api/health', async (_req, res) => { try { await pool.query('SELECT 1');