Checkpoint: Correctif de production : le serveur exécute désormais les migrations Drizzle versionnées avant l'ouverture HTTP, ce qui initialise une base vide lors du premier déploiement. Test de régression ajouté. Validation complète réussie : 61 tests, TypeScript et build.
All checks were successful
Validation applicative / TypeScript, tests et build (push) Successful in 4m45s

This commit is contained in:
Manus
2026-08-30 09:40:46 +00:00
parent 6447389cb8
commit b2c8580382
5 changed files with 58 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import { registerOAuthRoutes } from "./oauth";
import { registerStorageProxy } from "./storageProxy";
import { appRouter } from "../routers";
import { registerSalairesHttpRoutes } from "../salairesHttp";
import { runDatabaseMigrations } from "../databaseMigrations";
import { createContext } from "./context";
import { serveStatic, setupVite } from "./vite";
@@ -30,6 +31,8 @@ async function findAvailablePort(startPort: number = 3000): Promise<number> {
}
async function startServer() {
// Une instance ne devient disponible qu'après la synchronisation du schéma.
await runDatabaseMigrations();
const app = express();
const server = createServer(app);
// Configure body parser with larger size limit for file uploads