Files
api-AT/src/main.ts
T

21 lines
548 B
TypeScript
Raw Normal View History

2025-09-04 20:17:04 -04:00
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
2025-09-04 21:04:15 -04:00
import { ValidationPipe } from '@nestjs/common';
2025-09-12 13:18:11 -04:00
import { ConfigService } from '@nestjs/config';
2025-09-04 20:17:04 -04:00
async function bootstrap() {
const app = await NestFactory.create(AppModule);
2025-09-12 13:18:11 -04:00
const configService = app.get(ConfigService);
2025-09-04 21:04:15 -04:00
app.useGlobalPipes(new ValidationPipe());
2025-09-12 13:18:11 -04:00
app.enableCors(
2026-04-14 19:35:21 -05:00
// {
// origin: configService.get<string>('Front_URL'),
// }
);
app.enableShutdownHooks();
2025-09-04 20:17:04 -04:00
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();