Skip to content

Commit

Permalink
feat : Add 주석
Browse files Browse the repository at this point in the history
  • Loading branch information
pinomaker-hoo committed Aug 19, 2023
1 parent db912d4 commit 73c8ee4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,35 @@ import { NestExpressApplication } from '@nestjs/platform-express';
import { AllExceptionsFilter } from './filter/ExceptionFilter';

async function bootstrap() {
// ** Server Container 생성
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
bufferLogs: true,
});

// ** Logger
app.useLogger(app.get(LoggerService));

// ** FIlter 개념
app.useGlobalFilters(new AllExceptionsFilter());

// ** Global Pipe Line
app.useGlobalPipes(new ValidationPipe());

// ** Cors Setting
app.enableCors();

// ** Static Rouing
app.use('/file', express.static('./uploads'));

// ** View Setting
app.useStaticAssets(join(__dirname, '..', 'public'));
app.setBaseViewsDir(join(__dirname, '..', 'src/views'));
app.setViewEngine('hbs');

// ** Swagger Setting
swaggerConfig(app);

// ** Server ON Handler
await app.listen(process.env.SERVER_PORT);
}
bootstrap();

0 comments on commit 73c8ee4

Please sign in to comment.