Skip to content

Commit 0cfce3f

Browse files
authored
appService bootstrapService로 변경 (#135)
2 parents 26b6f33 + d289e4e commit 0cfce3f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/app.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
RequestMethod,
66
} from '@nestjs/common';
77
import { ApiModule } from '@src/apis/api.module';
8-
import { AppService } from '@src/app.service';
8+
import { BootstrapService } from '@src/bootstrap.service';
99
import { CoreModule } from '@src/core/core.module';
1010
import { HttpExceptionModule } from '@src/http-exceptions/http-exception.module';
1111
import { InterceptorModule } from '@src/interceptors/interceptor.module';
@@ -21,7 +21,7 @@ import { UseDevelopmentMiddleware } from '@src/middlewares/use-development.middl
2121
InterceptorModule,
2222
HttpExceptionModule,
2323
],
24-
providers: [AppService],
24+
providers: [BootstrapService],
2525
})
2626
export class AppModule implements NestModule {
2727
configure(consumer: MiddlewareConsumer) {

src/app.service.ts src/bootstrap.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { SuccessInterceptor } from '@src/interceptors/success-interceptor/succes
2626
import { singularize } from 'inflection';
2727

2828
@Injectable()
29-
export class AppService {
29+
export class BootstrapService {
3030
setCors(app: INestApplication) {
3131
app.enableCors();
3232
}

src/main.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { NestFactory } from '@nestjs/core';
2-
import { AppService } from '@src/app.service';
2+
import { BootstrapService } from '@src/bootstrap.service';
33
import { AppModule } from './app.module';
44

55
async function bootstrap() {
66
const app = await NestFactory.create(AppModule);
7-
const appService = app.get<AppService>(AppService);
7+
const bootstrapService = app.get<BootstrapService>(BootstrapService);
88

9-
appService.setCors(app);
10-
appService.setLogger(app);
11-
appService.setPathPrefix(app);
12-
appService.setInterceptor(app);
13-
appService.setPipe(app);
14-
appService.setFilter(app);
15-
appService.setSwagger(app);
9+
bootstrapService.setCors(app);
10+
bootstrapService.setLogger(app);
11+
bootstrapService.setPathPrefix(app);
12+
bootstrapService.setInterceptor(app);
13+
bootstrapService.setPipe(app);
14+
bootstrapService.setFilter(app);
15+
bootstrapService.setSwagger(app);
1616

17-
await appService.startingServer(app);
17+
await bootstrapService.startingServer(app);
1818
}
1919
bootstrap();

0 commit comments

Comments
 (0)