fix: correct dist path for static serving

This commit is contained in:
2026-02-04 23:44:55 +00:00
parent 4af01c0f36
commit e99fb8b274

View File

@@ -43,7 +43,8 @@ app.use('/api/server-metrics', serverMetricsRouter)
// Serve static files in production
if (isProduction) {
const distPath = path.join(__dirname, '..', 'dist')
// __dirname is /app/api/dist, need to go up 2 levels to /app/dist
const distPath = path.join(__dirname, '..', '..', 'dist')
app.use(express.static(distPath))
// SPA fallback - serve index.html for all non-API routes