Spaces:
Running
Running
Bibhu Mishra
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
abc493d | import { Module } from '@nestjs/common'; | |
| import { ConfigModule, ConfigService } from '@nestjs/config'; | |
| import { JwtModule } from '@nestjs/jwt'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { User } from '../common/entities/user.entity'; | |
| import { AuthController } from './auth.controller'; | |
| import { AuthService } from './auth.service'; | |
| import { JwtAuthGuard } from './jwt-auth.guard'; | |
| import { JwtStrategy } from './jwt.strategy'; | |
| ({ | |
| imports: [ | |
| TypeOrmModule.forFeature([User]), | |
| JwtModule.registerAsync({ | |
| imports: [ConfigModule], | |
| inject: [ConfigService], | |
| useFactory: (cfg: ConfigService) => ({ | |
| secret: cfg.get<string>('JWT_SECRET') ?? 'stockadvisor-secret', | |
| signOptions: { expiresIn: '7d' }, | |
| }), | |
| }), | |
| ], | |
| controllers: [AuthController], | |
| providers: [AuthService, JwtStrategy, JwtAuthGuard], | |
| exports: [JwtAuthGuard, AuthService, JwtModule], | |
| }) | |
| export class AuthModule {} | |