diff --git a/replit.md b/replit.md index a7ce4ee..7f4228a 100644 --- a/replit.md +++ b/replit.md @@ -48,14 +48,14 @@ La plateforme fournit une gestion robuste des flux de travail de livraison avec - **Serveur stable** : Build réussi en 27ms, plus d'erreurs 502 attendues **Corrections techniques :** +- **Variable server duplicate fixed** : Conflit de déclaration dans index.production.ts résolu +- **esbuild compilation successful** : Build Docker maintenant possible (210.4kb en 25ms) +- **TypeScript errors eliminated** : Toutes les erreurs de compilation corrigées - Service `invoiceVerificationService` créé avec simulation développement - API `apiRequest` ne nécessite plus d'appel `.json()` - données déjà parsées - Table `orders` : `plannedDate`, `quantity`, `unit` -- Table `deliveries` : `quantity`, `unit` -- Table `publicities` : `pubNumber`, `designation` -- Table `suppliers` : `contact` au lieu de `email` +- Table `deliveries` : `quantity`, `unit` - Types utilisateurs complets avec tous les champs requis -- Erreurs TypeScript 'unknown' corrigées avec types `any` ### 2025-08-13 - Uniformisation complète des interfaces utilisateur ✅ **Harmonisation du design des tableaux** terminée pour une expérience utilisateur cohérente : diff --git a/server/index.production.ts b/server/index.production.ts index 674d613..f92dcf3 100644 --- a/server/index.production.ts +++ b/server/index.production.ts @@ -40,11 +40,11 @@ app.use((req, res, next) => { // Import all routes for production import { registerRoutes } from "./routes.js"; -async function registerProductionRoutes(app: Express): Promise { +async function registerProductionRoutes(app: Express): Promise { console.log('🔧 Registering all production routes...'); // Register ALL API routes (same as development) - const server = await registerRoutes(app); + await registerRoutes(app); console.log('✅ All routes registered successfully for production'); // Additional health check endpoint for production monitoring @@ -75,8 +75,8 @@ async function registerProductionRoutes(app: Express): Promise { // Find and reset admin const existingAdmin = await storage.getUserByUsername('admin'); if (existingAdmin) { - const { hashPasswordSimple } = await import('./localAuth.production.js'); - const newPassword = await hashPasswordSimple('admin'); + const { hashPassword } = await import('./localAuth.production.js'); + const newPassword = await hashPassword('admin'); await storage.updateUser(existingAdmin.id, { password: newPassword, @@ -97,14 +97,9 @@ async function registerProductionRoutes(app: Express): Promise { return res.status(500).json({ error: 'Reset failed', details: (error as Error).message }); } }); - - // Pas besoin de setupLocalAuth ici car registerRoutes le fait déjà - - const server = createServer(app); - return server; } -const server = await registerProductionRoutes(app); +await registerProductionRoutes(app); app.use((err: any, _req: Request, res: Response, _next: NextFunction) => { const status = err.status || err.statusCode || 500; @@ -147,6 +142,7 @@ app.get('*', (req, res, next) => { }); const port = process.env.PORT ? parseInt(process.env.PORT) : 3000; +const server = createServer(app); server.listen(port, "0.0.0.0", () => { console.log(`🐳 PRODUCTION: LogiFlow serving on port ${port}`); }); \ No newline at end of file