precise-memory-rate-limit

2.0.1 • 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 MemoryStore = require("precise-memory-rate-limit")

const max = 10

const limiter = rateLimit({
    store: new MemoryStore(max),
    windowMs: 15 * 60 * 1000,
    max: max // Make sure this is the same as the max passed into the MemoryStore constructor
})

app.use(limiter)

precise-memory-ratelimit does not currently support using a middleware for the max

/precise-memory-rate-limit/

    Package Sidebar

    Install

    npm i precise-memory-rate-limit

    Weekly Downloads

    4

    Version

    2.0.1

    License

    ISC

    Unpacked Size

    7.09 kB

    Total Files

    11

    Last publish

    Collaborators

    • nebula1213