{"_id":"@bobthebike/sequelize-rate-limit-store","name":"@bobthebike/sequelize-rate-limit-store","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bobthebike/sequelize-rate-limit-store","version":"1.0.0","description":"A Sequelize store for express-rate-limit.","keywords":["express-rate-limit"],"license":"MIT","author":{"name":"BobTheBike"},"type":"commonjs","main":"src/index.js","scripts":{"test":""},"dependencies":{"sequelize":"^6.37.7"},"peerDependencies":{"express-rate-limit":">= 6","sequelize":">= 6"},"engines":{"node":">=18.0.0 <26.0.0","npm":">=8.0.0"},"gitHead":"c7e41b145ffdf0bbd922eed5d4532b963365c2af","_id":"@bobthebike/sequelize-rate-limit-store@1.0.0","_nodeVersion":"25.4.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-CyqD7lTLne1M/jIarhIV8lMdj0KtdMKVIi4nubP+mQzEKqQ2sK6UiHHLC8CIihWPBVqU/OH8ncyOmXAd8F54Zw==","shasum":"31d666b4aef8b0a880ddeec97d1202a8fd0a303e","tarball":"https://registry.npmjs.org/@bobthebike/sequelize-rate-limit-store/-/sequelize-rate-limit-store-1.0.0.tgz","fileCount":5,"unpackedSize":7460,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEKvCnPSFE4edECItyTutjpm03sUG7uPgSG+JX0dax/bAiBpEr0NcG9e1+o0VewGtU5THHpCEZk3ZMv7XmWuHDTu5g=="}]},"_npmUser":{"name":"bobthebike","email":"rbabichjr@gmail.com"},"directories":{},"maintainers":[{"name":"bobthebike","email":"rbabichjr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sequelize-rate-limit-store_1.0.0_1772832341109_0.9217321726650007"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T21:25:41.017Z","1.0.0":"2026-03-06T21:25:41.259Z","modified":"2026-03-06T21:25:41.577Z"},"maintainers":[{"name":"bobthebike","email":"rbabichjr@gmail.com"}],"description":"A Sequelize store for express-rate-limit.","keywords":["express-rate-limit"],"author":{"name":"BobTheBike"},"license":"MIT","readme":"# sequelize-rate-limit-store\n\n### A [Sequelize](https://sequelize.org/index.html) store for the [`express-rate-limit`](https://github.com/nfriedly/express-rate-limit) middleware.\n\n## Installation\n\n```bash\nnpm install sequelize-rate-limit-store\n```\n\n## Usage\n\n**This package requires Node 18 or above.**\n\nImport it in a CommonJS project as follows:\n\n```js\nconst { SequelizeStore } = require(\"sequelize-rate-limit-store\");\n```\n\n### Examples\n\n```js\n// Open the database, create connection, and initialize Sequelize\nconst db = {};\n\ndb.conn_config = {\n  dialect: db_dialect,\n  host: db_host,\n  storage: `./${db_file_name}`,\n};\n\nconst { rateLimit } = require(\"express-rate-limit\");\nconst { SequelizeStore } = require(\"sequelize-rate-limit-store\");\n\n// Create and use the rate limiter\nconst limiter = rateLimit({\n  // Rate limiter configuration\n  windowMs: 15 * 60 * 1000,\n  max: 100, // Limit each IP to 100 requests per `window`\n  standardHeaders: false, // Disable rate limit info in the `RateLimit-*` headers\n  legacyHeaders: false, // Disable the `X-RateLimit-*` headers\n\n  // Sequelize store configuration\n  store: new SequelizeStore({\n    store: db.conn_config,\n    // Optional: specify the name of the table to store rate limit data (default: 'rate_limits')\n    tableName: \"rate_limits\",\n  }),\n});\napp.use(limiter);\n```\n\n### Configuration\n\n#### `store`\n\n> `Sequelize` | `undefined`\n\nThe Sequelize instance to use for the database connection.\n","readmeFilename":"README.md","_rev":"1-93ee41ee140e37a27bb981d4e6f828d4"}