Fix: Use regex literal for wildcard route to support Express 5

This commit is contained in:
choibk 2026-01-23 21:52:03 +09:00
parent 53eb326cbe
commit d2b253e65d

View File

@ -168,7 +168,7 @@ if (fs.existsSync(clientDistPath)) {
app.use(express.static(clientDistPath)); app.use(express.static(clientDistPath));
// SPA Fallback: Any route not handled by API should return index.html // SPA Fallback: Any route not handled by API should return index.html
app.get('(.*)', (req, res) => { app.get(/.*/, (req, res) => {
if (!req.path.startsWith('/api')) { if (!req.path.startsWith('/api')) {
res.sendFile(path.join(clientDistPath, 'index.html')); res.sendFile(path.join(clientDistPath, 'index.html'));
} }