From f3c808952d6f6ca34ddbf42e0cb9cc59c462ad09 Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Sun, 14 Dec 2025 16:44:49 -0700 Subject: [PATCH] Fix Express 5 breaking change: Replace app.use('*') with app.all('*') Express 5 no longer supports wildcard '*' in app.use() for 404 handlers. Changed to app.all('*') which is the correct Express 5 pattern. --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index e413a3ef..0d3f05eb 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -133,8 +133,8 @@ app.use('/api/documents', documentRoutes); app.use('/api/subscriptions', subscriptionRoutes); app.use('/api/notifications', notificationRoutes); -// 404 handler -app.use('*', (req, res) => { +// 404 handler - Express 5 requires explicit path +app.all('*', (req, res) => { res.status(404).json({ success: false, message: 'Route not found',