import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors({ origin: '*', methods: ['GET', 'POST'], allowedHeaders: ['Content-Type'], }); const port = process.env.APP_PORT || 3000; await app.listen(port); console.log(`Server running on port ${port}`); } bootstrap();