title: Rate limit feature is not working in nestjs app
body: <p>I'm exploring the <strong>NestJS</strong> and I'm trying to explore <code>rate limit</code> feature. </p>
  
  <p>This is my <code>main.ts</code> file. </p>
  
  <pre><code>import { NestFactory } from '@nestjs/core';
  import { AppModule } from './app.module';
  import * as rateLimit from 'express-rate-limit';
  async function bootstrap() {
    const app = await NestFactory.create(AppModule);
    await app.listen(3000);
    app.use(
      rateLimit({
        windowMs: 60 * 1000, // 1 minutes
        max: 10, // limit each IP to 100 requests per windowMs
      }),
    );
  }
  bootstrap();
  </code></pre>
  
  <p>I'm using its official site for <a href="https://docs.nestjs.com/techniques/security" rel="nofollow noreferrer">reference</a>.</p>
  
  <p><strong>Required output</strong></p>
  
  <ul>
  <li>User should not able to call API/access app more than 10 times in each minute.</li>
  </ul>
  
  <p><strong>Note:</strong></p>
  
  <ul>
  <li>I'm using <code>jmeter</code> to test API call.</li>
  </ul>