6to Commit

This commit is contained in:
DillusDev001 2026-10-23 08:59:27 -04:00
parent 6d107d4397
commit d910d65b61

View file

@ -27,6 +27,12 @@ async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule); const app = await NestFactory.create<NestExpressApplication>(AppModule);
// CORS para la web (Flutter web corre en otro origen — p.ej. localhost —
// y sin esto el navegador bloquea todos los fetch y la app muestra
// "Sin conexión con el servidor"). Mismo criterio que el gateway socket.io
// (origin '*'): la API ya se protege con JWT, no con CORS.
app.enableCors();
// Seed del primer Developer (idempotente) — requiere tablas ya sincronizadas por TypeORM // Seed del primer Developer (idempotente) — requiere tablas ya sincronizadas por TypeORM
try { try {
await seedFirstDeveloper(); await seedFirstDeveloper();