Neutered Paranoid Meerkat

    precise-memory-rate-limit

    1.1.5 • Public • Published

    Precise Memory Rate Limit

    Precise memory store for express-rate-limit.

    Npm version

    Install

    $ npm install --save precise-memory-rate-limit

    Example

    const rateLimit = require("express-rate-limit");
    const preciseMemory = require("precise-memory-rate-limit")
    
    const limiter = rateLimit({
      store: new preciseMemory(15 * 60 * 1000, 100),
      windowMs: 15 * 60 * 1000, // Make sure this is the same as the windowMS passed into the preciseMemory constructor
      max: 100 // Make sure this is the same as the maxCalls passed into the preciseMemory constructor
    });
    
    app.use(limiter);

    Install

    npm i precise-memory-rate-limit

    DownloadsWeekly Downloads

    38

    Version

    1.1.5

    License

    ISC

    Unpacked Size

    5.12 kB

    Total Files

    9

    Last publish

    Collaborators

    • nebula1213