Skip to content

Commit

Permalink
AppModule에 RouterModule를 추가하라
Browse files Browse the repository at this point in the history
RouterModule 모듈을 사용하여 엔드포인트에 admin 접두사를 추가 할 수 있습니다.
  • Loading branch information
jihwooon committed Oct 31, 2023
1 parent f50bc5b commit 5ccc1fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Module } from '@nestjs/common'
import { RouterModule } from '@nestjs/core'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import { ConfigModule } from '@nestjs/config'
Expand All @@ -15,6 +16,12 @@ import { ExceptionModule } from './config/error/exception.module'
AuthModule,
ItemModule,
ExceptionModule,
RouterModule.register([
{
path: 'admin',
module: ItemModule,
},
]),
],
controllers: [AppController],
providers: [AppService],
Expand Down

0 comments on commit 5ccc1fb

Please sign in to comment.