File tree 3 files changed +13
-13
lines changed
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 5
5
RequestMethod ,
6
6
} from '@nestjs/common' ;
7
7
import { ApiModule } from '@src/apis/api.module' ;
8
- import { AppService } from '@src/app .service' ;
8
+ import { BootstrapService } from '@src/bootstrap .service' ;
9
9
import { CoreModule } from '@src/core/core.module' ;
10
10
import { HttpExceptionModule } from '@src/http-exceptions/http-exception.module' ;
11
11
import { InterceptorModule } from '@src/interceptors/interceptor.module' ;
@@ -21,7 +21,7 @@ import { UseDevelopmentMiddleware } from '@src/middlewares/use-development.middl
21
21
InterceptorModule ,
22
22
HttpExceptionModule ,
23
23
] ,
24
- providers : [ AppService ] ,
24
+ providers : [ BootstrapService ] ,
25
25
} )
26
26
export class AppModule implements NestModule {
27
27
configure ( consumer : MiddlewareConsumer ) {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { SuccessInterceptor } from '@src/interceptors/success-interceptor/succes
26
26
import { singularize } from 'inflection' ;
27
27
28
28
@Injectable ( )
29
- export class AppService {
29
+ export class BootstrapService {
30
30
setCors ( app : INestApplication ) {
31
31
app . enableCors ( ) ;
32
32
}
Original file line number Diff line number Diff line change 1
1
import { NestFactory } from '@nestjs/core' ;
2
- import { AppService } from '@src/app .service' ;
2
+ import { BootstrapService } from '@src/bootstrap .service' ;
3
3
import { AppModule } from './app.module' ;
4
4
5
5
async function bootstrap ( ) {
6
6
const app = await NestFactory . create ( AppModule ) ;
7
- const appService = app . get < AppService > ( AppService ) ;
7
+ const bootstrapService = app . get < BootstrapService > ( BootstrapService ) ;
8
8
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 ) ;
16
16
17
- await appService . startingServer ( app ) ;
17
+ await bootstrapService . startingServer ( app ) ;
18
18
}
19
19
bootstrap ( ) ;
You can’t perform that action at this time.
0 commit comments