Spaces:
Running
Running
| import { Module } from "@nestjs/common"; | |
| import { ConfigModule, ConfigService } from "@nestjs/config"; | |
| import { ThrottlerModule, ThrottlerGuard } from "@nestjs/throttler"; | |
| import { APP_GUARD } from "@nestjs/core"; | |
| import { ScheduleModule } from "@nestjs/schedule"; | |
| import { DatabaseModule } from "./database/database.module"; | |
| import { AuthModule } from "./auth/auth.module"; | |
| import { UserProfileModule } from "./user-profile/user-profile.module"; | |
| import { BloodPressureModule } from "./blood-pressure/blood-pressure.module"; | |
| import { SymptomsModule } from "./symptoms/symptoms.module"; | |
| import { CarePriorityModule } from "./care-priority/care-priority.module"; | |
| import { NotificationsModule } from "./notifications/notifications.module"; | |
| import { EducationModule } from "./education/education.module"; | |
| import { ClinicFinderModule } from "./clinic-finder/clinic-finder.module"; | |
| import { MonitoringEngineModule } from "./monitoring-engine/monitoring-engine.module"; | |
| import { EmailModule } from "./email/email.module"; | |
| import { ContactUsModule } from "./contact-us/contact-us.module"; | |
| import { AppointmentsModule } from "./appointments/appointments.module"; | |
| import { HealthWorkerModule } from "./health-worker/health-worker.module"; | |
| import { OrganizationsModule } from "./organizations/organizations.module"; | |
| import { FacilitiesModule } from "./facilities/facilities.module"; | |
| import { AdminHealthWorkersModule } from "./admin-health-workers/admin-health-workers.module"; | |
| import { PatientsModule } from "./patients/patients.module"; | |
| import { AppController } from "./app.controller"; | |
| import { HealthController } from "./health.controller"; | |
| import { ReferralModule } from "./referral/referral.module"; | |
| import { EmergencyModule } from "./emergency/emergency.module"; | |
| import { AncVisitModule } from "./anc-visit/anc-visit.module"; | |
| import { OcrModule } from "./ocr/ocr.module"; | |
| import { RiskModule } from "./risk/risk.module"; | |
| ({ | |
| imports: [ | |
| // Configuration | |
| ConfigModule.forRoot({ | |
| isGlobal: true, | |
| envFilePath: ".env", | |
| }), | |
| // Scheduling | |
| ScheduleModule.forRoot(), | |
| // Throttling | |
| ThrottlerModule.forRoot([ | |
| { | |
| ttl: 60000, | |
| limit: 20, | |
| }, | |
| ]), | |
| // Database (Prisma) - Global module | |
| DatabaseModule, | |
| // Domain modules | |
| AuthModule, | |
| UserProfileModule, | |
| BloodPressureModule, | |
| SymptomsModule, | |
| CarePriorityModule, | |
| NotificationsModule, | |
| EducationModule, | |
| ClinicFinderModule, | |
| MonitoringEngineModule, | |
| EmailModule, | |
| ContactUsModule, | |
| AppointmentsModule, | |
| HealthWorkerModule, | |
| OrganizationsModule, | |
| FacilitiesModule, | |
| AdminHealthWorkersModule, | |
| PatientsModule, | |
| ReferralModule, | |
| EmergencyModule, | |
| AncVisitModule, | |
| OcrModule, | |
| RiskModule, | |
| ], | |
| controllers: [AppController, HealthController], | |
| providers: [ | |
| { | |
| provide: APP_GUARD, | |
| useClass: ThrottlerGuard, | |
| }, | |
| ], | |
| }) | |
| export class AppModule {} | |