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
All checks were successful
Validation applicative / TypeScript, tests et build (push) Successful in 4m45s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user