mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
feat: create junior
This commit is contained in:
@ -3,12 +3,20 @@ import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import { Logger } from 'nestjs-pino';
|
||||
import { initializeTransactionalContext } from 'typeorm-transactional';
|
||||
import { AppModule } from './app.module';
|
||||
const DEFAULT_PORT = 3000;
|
||||
async function bootstrap() {
|
||||
initializeTransactionalContext();
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
app.useLogger(app.get(Logger));
|
||||
app.enableCors({
|
||||
origin: '*',
|
||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||
preflightContinue: false,
|
||||
optionsSuccessStatus: 204,
|
||||
});
|
||||
const config = app.get(ConfigService);
|
||||
const swaggerDocument = await createSwagger(app);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user