rocky1410 commited on
Commit
0b4d89b
·
1 Parent(s): 2b19ed8

fixed server file

Browse files
Files changed (1) hide show
  1. server.js +2 -2
server.js CHANGED
@@ -198,8 +198,8 @@ app.post('/api/modify-code', async (req, res) => {
198
  }
199
  });
200
 
201
- // Serve React app for all other routes
202
- app.get('*', (req, res) => {
203
  res.sendFile(path.join(__dirname, 'dist', 'index.html'));
204
  });
205
 
 
198
  }
199
  });
200
 
201
+ // Serve React app for all other routes (use RegExp to avoid path-to-regexp wildcard parsing issues)
202
+ app.get(/.*/, (req, res) => {
203
  res.sendFile(path.join(__dirname, 'dist', 'index.html'));
204
  });
205