import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors({ origin: '*', methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', credentials: true, }); const port = process.env.PORT || 5001; await app.listen(port); console.log(`NestJS Backend server is running on: http://localhost:${port}`); } bootstrap();