Spaces:
Sleeping
Sleeping
Bibhu Mishra
Claude Sonnet 4.6
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
abc493d Download api/src/auth/auth.module.ts from mishrabp/stockadvisor: direct link, hf CLI and curl.
- Browser
- Download file 946 Bytes
-
https://huggingface.co/spaces/mishrabp/stockadvisor/resolve/main/api/src/auth/auth.module.ts
- Command line
-
hf download hf://spaces/mishrabp/stockadvisor/api/src/auth/auth.module.ts
-
curl -L -o auth.module.ts https://huggingface.co/spaces/mishrabp/stockadvisor/resolve/main/api/src/auth/auth.module.ts
946 Bytes
| 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 {} | |