diff --git a/server/src/index.ts b/server/src/index.ts index 0b1aa02..121c097 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -1530,11 +1530,19 @@ app.post('/api/play-url', async (req: Request, res: Response) => { const webDistPath = path.resolve(__dirname, '../../web/dist'); if (fs.existsSync(webDistPath)) { app.use(express.static(webDistPath)); - app.get('*', (_req, res) => { + app.get('/{*splat}', (_req, res) => { res.sendFile(path.join(webDistPath, 'index.html')); }); } +process.on('uncaughtException', (err) => { + console.error(`FATAL uncaughtException:`, err); + process.exit(1); +}); +process.on('unhandledRejection', (reason) => { + console.error(`FATAL unhandledRejection:`, reason); +}); + app.listen(PORT, () => { console.log(`Server läuft auf http://0.0.0.0:${PORT}`);