Add missing API routes and improve system stability for production

Add missing API routes (/api/users, /api/roles, /api/deliveries) and resolve 404 errors in production, alongside improvements to authentication and core routing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 54292eb6-296c-47a3-8f4e-c9967863556c
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-08-11 16:13:12 +00:00
1 parent aa3b4567ac
commit b079805288
5 files changed
+199 -6

No files matched your search

+5 -1
View File
@@ -98,7 +98,11 @@ async function registerProductionRoutes(app: Express): Promise<Server> {
// Setup authentication
setupLocalAuth(app);
// Basic API routes for production
// Import and register all routes from routes.ts instead of having limited routes
const { registerRoutes } = await import('./routes.js');
await registerRoutes(app);
// Additional health check route for Docker compatibility
app.get('/api/groups', requireAuth, async (req: Request, res: Response) => {
try {
const groups = await storage.getGroups();