20 lines
511 B
TypeScript
20 lines
511 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { AppModule } from './app.module';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { ConfigService } from '@nestjs/config';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
const configService = app.get(ConfigService);
|
|
|
|
app.useGlobalPipes(new ValidationPipe());
|
|
|
|
app.enableCors(
|
|
// {
|
|
// origin: configService.get<string>('Front_URL'),
|
|
// }
|
|
);
|
|
await app.listen(process.env.PORT ?? 3000);
|
|
}
|
|
bootstrap();
|