fix: update route handling for static files to improve frontend serving
Release Pipeline / build-and-release (push) Successful in 5m36s

This commit is contained in:
LaurensBartelds committed 2026-04-24 22:52:53 +02:00
1 parent 9539e3d740
commit 7b4288fe86
1 file changed
+1 -1
+1 -1
View File
@@ -39,7 +39,7 @@ const frontendDistPath = path.join(__dirname, '../../frontend/dist')
if (fs.existsSync(frontendDistPath)) { if (fs.existsSync(frontendDistPath)) {
console.log(`Serving frontend from: ${frontendDistPath}`) console.log(`Serving frontend from: ${frontendDistPath}`)
app.use(express.static(frontendDistPath)) app.use(express.static(frontendDistPath))
app.get('*', (req, res) => { app.get('*path', (req, res) => {
if (!req.path.startsWith('/api')) { if (!req.path.startsWith('/api')) {
res.sendFile(path.join(frontendDistPath, 'index.html')) res.sendFile(path.join(frontendDistPath, 'index.html'))
} else { } else {