* Add rate limiting in the server using built in Nest.js capability * Generatekey based on ip address when an http request is sent * Update env var types to number for ttl and limit * Remove unused env variables * Use getRequest utility function * fix: remove dist from path * fix: adding .env variables * fix: remove unused functions * feat: throttler plugin * Fix according to review --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
32 lines
977 B
TypeScript
32 lines
977 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { GraphQLModule } from '@nestjs/graphql';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
|
|
import { YogaDriver, YogaDriverConfig } from '@graphql-yoga/nestjs';
|
|
|
|
import { GraphQLConfigService } from 'src/graphql-config/graphql-config.service';
|
|
|
|
import { CoreModule } from './core/core.module';
|
|
import { IntegrationsModule } from './integrations/integrations.module';
|
|
import { HealthModule } from './health/health.module';
|
|
import { WorkspaceModule } from './workspace/workspace.module';
|
|
import { GraphQLConfigModule } from './graphql-config/graphql-config.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
}),
|
|
GraphQLModule.forRootAsync<YogaDriverConfig>({
|
|
driver: YogaDriver,
|
|
imports: [CoreModule, GraphQLConfigModule],
|
|
useClass: GraphQLConfigService,
|
|
}),
|
|
HealthModule,
|
|
IntegrationsModule,
|
|
CoreModule,
|
|
WorkspaceModule,
|
|
],
|
|
})
|
|
export class AppModule {}
|