chore:init project template

This commit is contained in:
cherites
2026-04-14 11:49:30 +08:00
commit 067755c64b
27 changed files with 9042 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import { Module } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { ThrottlerModule as NestThrottlerModule } from '@nestjs/throttler'
@Module({
imports: [
NestThrottlerModule.forRootAsync({
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
throttlers: [
{
ttl: config.getOrThrow<number>('THROTTLE_TTL'),
limit: config.getOrThrow<number>('THROTTLE_LIMIT'),
},
],
}),
}),
],
})
export class ThrottlerModule {}