Files
yunhaifinance/backend/src/main.ts
T

14 lines
453 B
TypeScript
Raw Normal View History

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: ['http://localhost:5173', 'http://localhost:4173', 'http://localhost:5174'],
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
allowedHeaders: ['Content-Type', 'Authorization'],
});
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();