| 1 | import { Module } from '@nestjs/common'; |
| 2 | import { AuthServiceController } from './auth-service.controller'; |
| 3 | import { AuthServiceService } from './auth-service.service'; |
| 4 | import { KafkaModule } from '@app/kafka'; |
| 5 | import { DatabaseModule } from '@app/database'; |
| 6 | import { PassportModule } from '@nestjs/passport'; |
| 7 | import { JwtModule } from '@nestjs/jwt'; |
| 8 | import { JwtStrategy } from './jwt.strategy'; |
| 9 | |
| 10 | @Module({ |
| 11 | imports: [ |
| 12 | KafkaModule.register('auth-service-group'), |
| 13 | DatabaseModule, |
| 14 | PassportModule, |
| 15 | JwtModule.register({ |
| 16 | secret: process.env.JWT_SECRET || 'secret', |
| 17 | signOptions: { expiresIn: '1d' }, |
| 18 | }), |
| 19 | ], |
| 20 | controllers: [AuthServiceController], |
| 21 | providers: [AuthServiceService, JwtStrategy], |
| 22 | }) |
| 23 | export class AuthServiceModule {} |