2026-09-09 06:46:27 +03:30
|
|
|
import 'reflect-metadata';
|
|
|
|
|
import { NestFactory } from '@nestjs/core';
|
|
|
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
|
|
|
import { AppModule } from './app.module';
|
|
|
|
|
import { PrismaExceptionFilter } from './prisma/prisma-exception.filter';
|
|
|
|
|
|
|
|
|
|
async function bootstrap() {
|
|
|
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
|
app.setGlobalPrefix('api');
|
|
|
|
|
app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));
|
|
|
|
|
app.useGlobalFilters(new PrismaExceptionFilter());
|
|
|
|
|
app.enableCors();
|
2026-09-10 14:51:57 +03:30
|
|
|
// Bind all interfaces explicitly so the container is reachable from nginx.
|
|
|
|
|
await app.listen(process.env.PORT ?? 3000, '0.0.0.0');
|
2026-09-09 06:46:27 +03:30
|
|
|
}
|
|
|
|
|
bootstrap();
|