Skip to content

Commit

Permalink
FIX :: 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
soyeonkim0227 committed May 10, 2024
1 parent 43e5545 commit 21041ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ lerna-debug.log*
!.vscode/extensions.json

# Enviroment
.env
*.env
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AuthModule } from './core/auth/auth.module';
import { RedisModule } from '@liaoliaots/nestjs-redis';
import { HTTPLoggerMiddleware } from './infrastructure/config/HTTP-logger.middleware';
import { redisConfig, typeORMConfig } from './infrastructure/config/db.config';
import { JwtCustomModule } from './infrastructure/jwt/jwt.module';

@Module({
imports: [
Expand All @@ -26,6 +27,7 @@ import { redisConfig, typeORMConfig } from './infrastructure/config/db.config';
PostLikeModule,
TipLikeModule,
AuthModule,
JwtCustomModule,
TypeOrmModule.forRoot(typeORMConfig),
RedisModule.forRoot(redisConfig),
],
Expand Down
12 changes: 11 additions & 1 deletion src/core/post/post.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ import { Post } from '../../domain/post/post.entity';
import { PostLinkService } from './post.service';
import { PostRepository } from '../../domain/post/post.repository';
import { JwtAdapter } from '../../infrastructure/jwt/jwt.adapter';
import { UserRepository } from 'src/domain/user/user.repository';
import { User } from 'src/domain/user/user.entity';

import { JwtModule } from '@nestjs/jwt';

@Module({
imports: [TypeOrmModule.forFeature([Post])],
imports: [
TypeOrmModule.forFeature([Post, User]),
JwtModule.register({
secret: process.env.SECRET_KEY,
}),
],
providers: [
{ provide: 'postLink', useClass: PostLinkService },
{ provide: 'post out port', useClass: PostRepository },
{ provide: 'user out port', useClass: UserRepository },
{ provide: 'jwt', useClass: JwtAdapter },
],
controllers: [PostController],
Expand Down

0 comments on commit 21041ff

Please sign in to comment.