mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 15:05:45 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d78ba474d8 |
@@ -41,11 +41,6 @@ app.get('/api/health', (req: any, res: any) => {
|
|||||||
// 🆕 STATIC FILE SERVING FÜR FRONTEND
|
// 🆕 STATIC FILE SERVING FÜR FRONTEND
|
||||||
app.use(express.static(path.join(__dirname, '../../frontend-build')));
|
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
|
// Error handling middleware
|
||||||
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
|
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||||
console.error('Unhandled error:', err);
|
console.error('Unhandled error:', err);
|
||||||
|
|||||||
Reference in New Issue
Block a user