From 5ccc1fbb04c09c2174846c964db4682cad7a122a Mon Sep 17 00:00:00 2001 From: jihwooon Date: Tue, 31 Oct 2023 23:21:33 +0900 Subject: [PATCH] =?UTF-8?q?AppModule=EC=97=90=20RouterModule=EB=A5=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=98=EB=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RouterModule 모듈을 사용하여 엔드포인트에 admin 접두사를 추가 할 수 있습니다. --- server/src/app.module.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/src/app.module.ts b/server/src/app.module.ts index 3f9208e..6948b40 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -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' @@ -15,6 +16,12 @@ import { ExceptionModule } from './config/error/exception.module' AuthModule, ItemModule, ExceptionModule, + RouterModule.register([ + { + path: 'admin', + module: ItemModule, + }, + ]), ], controllers: [AppController], providers: [AppService],