initial: standalone repo from monorepo split
This commit is contained in:
81
src/app.module.ts
Normal file
81
src/app.module.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR } from '@nestjs/core';
|
||||
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
|
||||
import { HealthModule } from './health/health.module';
|
||||
import { PrismaModule } from './prisma/prisma.module';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
import { UserModule } from './user/user.module';
|
||||
import { TenantModule } from './tenant/tenant.module';
|
||||
import { AreaModule } from './area/area.module';
|
||||
import { PlanModule } from './plan/plan.module';
|
||||
import { ClientModule } from './client/client.module';
|
||||
import { TicketModule } from './ticket/ticket.module';
|
||||
import { SubscriptionModule } from './subscription/subscription.module';
|
||||
import { InvoiceModule } from './invoice/invoice.module';
|
||||
import { PaymentModule } from './payment/payment.module';
|
||||
import { DashboardModule } from './dashboard/dashboard.module';
|
||||
import { ReportModule } from './report/report.module';
|
||||
import { NotificationModule } from './notification/notification.module';
|
||||
import { AuditModule } from './audit/audit.module';
|
||||
import { EmployeeModule } from './employee/employee.module';
|
||||
import { ExpenseModule } from './expense/expense.module';
|
||||
import { AccountModule } from './account/account.module';
|
||||
import { AssetModule } from './asset/asset.module';
|
||||
import { PortalModule } from './portal/portal.module';
|
||||
import { BillingModule } from './billing/billing.module';
|
||||
import { SchedulerModule } from './scheduler/scheduler.module';
|
||||
import { AccountingModule } from './accounting/accounting.module';
|
||||
import { PayrollModule } from './payroll/payroll.module';
|
||||
import { RoleModule } from './role/role.module';
|
||||
import { GlobalExceptionFilter } from './common/filters/http-exception.filter';
|
||||
import { ResponseInterceptor } from './common/interceptors/response.interceptor';
|
||||
import { PermissionsGuard } from './common/guards/permissions.guard';
|
||||
import { AccessGuard } from './common/guards/access.guard';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
envFilePath: '../../.env',
|
||||
}),
|
||||
ThrottlerModule.forRoot([
|
||||
{ name: 'short', ttl: 1000, limit: 50 }, // 50 req/sec
|
||||
{ name: 'medium', ttl: 60000, limit: 500 }, // 500 req/min
|
||||
]),
|
||||
PrismaModule,
|
||||
HealthModule,
|
||||
AuthModule,
|
||||
UserModule,
|
||||
TenantModule,
|
||||
AreaModule,
|
||||
PlanModule,
|
||||
ClientModule,
|
||||
TicketModule,
|
||||
SubscriptionModule,
|
||||
InvoiceModule,
|
||||
PaymentModule,
|
||||
DashboardModule,
|
||||
ReportModule,
|
||||
NotificationModule,
|
||||
AuditModule,
|
||||
EmployeeModule,
|
||||
ExpenseModule,
|
||||
AccountModule,
|
||||
AssetModule,
|
||||
PortalModule,
|
||||
BillingModule,
|
||||
SchedulerModule,
|
||||
AccountingModule,
|
||||
PayrollModule,
|
||||
RoleModule,
|
||||
],
|
||||
providers: [
|
||||
{ provide: APP_FILTER, useClass: GlobalExceptionFilter },
|
||||
{ provide: APP_GUARD, useClass: ThrottlerGuard },
|
||||
{ provide: APP_GUARD, useClass: PermissionsGuard },
|
||||
{ provide: APP_GUARD, useClass: AccessGuard },
|
||||
{ provide: APP_INTERCEPTOR, useClass: ResponseInterceptor },
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
Reference in New Issue
Block a user