fix: correct dist path for static serving
This commit is contained in:
@@ -43,7 +43,8 @@ app.use('/api/server-metrics', serverMetricsRouter)
|
|||||||
|
|
||||||
// Serve static files in production
|
// Serve static files in production
|
||||||
if (isProduction) {
|
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))
|
app.use(express.static(distPath))
|
||||||
|
|
||||||
// SPA fallback - serve index.html for all non-API routes
|
// SPA fallback - serve index.html for all non-API routes
|
||||||
|
|||||||
Reference in New Issue
Block a user