import { NestFactory } from '@nestjs/core'; import { ValidationPipe } from '@nestjs/common'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors({ origin: [ process.env.FRONTEND_URL || 'http://localhost:3000', 'http://localhost:3000', 'http://localhost:19006', // Expo dev server ], credentials: true, }); app.setGlobalPrefix('api/v1'); app.useGlobalPipes( new ValidationPipe({ whitelist: true, transform: true, forbidNonWhitelisted: true, }), ); const port = process.env.PORT || 3001; await app.listen(port); console.log(`The Vibe API running on port ${port}`); } bootstrap();