mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
removed express static fallback
This commit is contained in:
@@ -41,11 +41,6 @@ app.get('/api/health', (req: any, res: any) => {
|
||||
// 🆕 STATIC FILE SERVING FÜR FRONTEND
|
||||
app.use(express.static(path.join(__dirname, '../../frontend-build')));
|
||||
|
||||
// 🆕 FALLBACK FÜR CLIENT-SIDE ROUTING
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../../frontend-build/index.html'));
|
||||
});
|
||||
|
||||
// Error handling middleware
|
||||
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
console.error('Unhandled error:', err);
|
||||
|
||||
Reference in New Issue
Block a user