미해결
Slack 클론 코딩[백엔드 with NestJS + TypeORM]
hotReload 사용시 TypeOrmModuleOptions에서 entities Path를 넣어서 Entity를 인식시킬 수 있는 방법이 없나요?
안녕하세요 제가 강의를 다 듣고 TypeOrm 환경설정을 하는데요yarn build 후yarn nest start를 하면entities: [
__dirname + '/../**/*.entity{.ts,.js}',
],와 같이하면 Entity를 인식하는데https://docs.nestjs.com/recipes/hot-reload위에 문서에 있는 내용으로 hot-reload를 하면 entity 인식을 못하네요 이유인즉은위에 hot-reload를 하면 dist 경로에 main.js만 생성이 되더라고요. yarn build를 하면 entities 경로에 entity들이 .js 파일로 떨어지고요 그래서 여러가지 시도를 해봤는데 번번히 실패를 해서요 그래서 현재 entities를 명시적으로 쓰는 방법으로 하고 있습니다(아래와 같이) entities: [
ChannelChats,
ChannelMembers,
Channels,
DMs,
Mentions,
Users,
WorkspaceMembers,
Workspaces,
], 혹시 entities를 경로로 설정하면서 hot-reload를 적용할 수 있는 방법이 있을까요?