Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

nestjs ratelimit

// app.module.ts
import { Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';
import { ThrottlerGuard, ThrottlerModule } from '@nestjs/throttler';

@Module({
  imports: [
    ThrottlerModule.forRoot({
   	  ttl: 60, // Time to live, in seconds
      limit: 10, // Requests within the TTL
    }) 
  ],
  providers: [
    {
      provide: APP_GUARD,
      useClass: ThrottlerGuard,
    } // To guard globally
  ]
})
export class AppModule {}
Comment

PREVIOUS NEXT
Code Example
Typescript :: react app with typescript 
Typescript :: set localStorage angualr 
Typescript :: how to use typescript to read a file 
Typescript :: file_check.ps1 cannot be loaded because running scripts is disabled on this system. 
Typescript :: pip install -u git https://github.com/rapptz/discord.py@rewrite 
Typescript :: store array in userdefaults swift 
Typescript :: angular get item from localstorage 
Typescript :: typescript input 
Typescript :: download and run exploits from exploit-db 
Typescript :: pub schedule firebase 
Typescript :: already exists http status code 
Typescript :: end to end testing vs unit testing 
Typescript :: := and = in gdscript 
Typescript :: absolute import typescript react 
Typescript :: cube numbers list 
Typescript :: google charts haxis font size 
Typescript :: mat dialog disable close 
Typescript :: react query staletime 
Typescript :: typescript array of possible object keys 
Typescript :: three dots dropdown menu bootstrap 
Typescript :: how to put two elements on top of each other css 
Typescript :: angular closest element 
Typescript :: typescript moment type 
Typescript :: reactnative upload image axios 0.66 
Typescript :: how to remove the white space between two plots in r 
Typescript :: sample typescript code 
Typescript :: type usestate typescript 
Typescript :: brackets latex 
Typescript :: ionic web platform 
Typescript :: typescript webpack node 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =