fix: 后端添加express.static提供前端dist,9110端口可访问网页

This commit is contained in:
Agent
2026-07-14 17:48:29 +08:00
parent 534a922d8b
commit 427c016bd8
+3
View File
@@ -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');