first commit

This commit is contained in:
Mr Cheff 2024-12-25 23:45:00 +01:00 committed by mr. M
commit 232d8b37d6
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
36 changed files with 11302 additions and 0 deletions

31
src/app.module.ts Normal file
View file

@ -0,0 +1,31 @@
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
import { APP_GUARD } from '@nestjs/core';
import { GitHubModule } from './github/github.module';
import { RicesModule } from './rices/rices.module';
import { ThrottlerExceptionFilter } from './common/filters/throttler-exception.filter';
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
}),
ThrottlerModule.forRoot([
{
ttl: 60000,
limit: 10,
},
]),
GitHubModule,
RicesModule,
],
controllers: [],
providers: [
{
provide: APP_GUARD,
useClass: ThrottlerGuard,
},
],
})
export class AppModule {}