Download apps/api/src/app.module.ts from qf46578/omnics: direct link, hf CLI and curl.
- Browser
- Download file 2 kB
-
https://huggingface.co/spaces/qf46578/omnics/resolve/main/apps/api/src/app.module.ts
- Command line
-
hf download hf://spaces/qf46578/omnics/apps/api/src/app.module.ts
-
curl -L -o app.module.ts https://huggingface.co/spaces/qf46578/omnics/resolve/main/apps/api/src/app.module.ts
2 kB
| import { Module } from '@nestjs/common'; | |
| import { ConfigModule } from '@nestjs/config'; | |
| import { JwtModule } from '@nestjs/jwt'; | |
| import { PassportModule } from '@nestjs/passport'; | |
| import { ThrottlerModule } from '@nestjs/throttler'; | |
| // Modules | |
| import { UserModule } from './modules/users/user.module'; | |
| import { RoleModule } from './modules/roles/role.module'; | |
| import { AuthModule } from './modules/auth/auth.module'; | |
| import { PlatformModule } from './modules/platforms/platform.module'; | |
| import { ConversationModule } from './modules/conversations/conversation.module'; | |
| import { MessageModule } from './modules/messages/message.module'; | |
| import { KnowledgeModule } from './modules/knowledge/knowledge.module'; | |
| import { AIModule } from './modules/ai/ai.module'; | |
| import { AutomationModule } from './modules/automation/automation.module'; | |
| import { SensitiveModule } from './modules/sensitive/sensitive.module'; | |
| // Config | |
| import { DatabaseModule } from './database/database.module'; | |
| import { LoggerService } from './common/services/logger.service'; | |
| ({ | |
| imports: [ | |
| // Configuration | |
| ConfigModule.forRoot({ | |
| isGlobal: true, | |
| envFilePath: ['.env', '.env.local', '.env.production'], | |
| }), | |
| // Rate Limiting | |
| ThrottlerModule.forRoot([ | |
| { | |
| name: 'short', | |
| ttl: 1000, | |
| limit: 10, | |
| }, | |
| { | |
| name: 'long', | |
| ttl: 60000, | |
| limit: 100, | |
| }, | |
| ]), | |
| // Authentication | |
| PassportModule.register({ defaultStrategy: 'jwt' }), | |
| JwtModule.register({ | |
| global: true, | |
| secret: process.env.JWT_SECRET || 'omnics-secret-key', | |
| signOptions: { expiresIn: '24h' }, | |
| }), | |
| // Core | |
| DatabaseModule, | |
| // Feature Modules | |
| UserModule, | |
| RoleModule, | |
| AuthModule, | |
| PlatformModule, | |
| ConversationModule, | |
| MessageModule, | |
| KnowledgeModule, | |
| AIModule, | |
| AutomationModule, | |
| SensitiveModule, | |
| ], | |
| providers: [LoggerService], | |
| exports: [LoggerService], | |
| }) | |
| export class AppModule {} | |