Installation
Install hitlimit using your preferred package manager.
Node.js
npm install @joint-ops/hitlimit pnpm add @joint-ops/hitlimit yarn add @joint-ops/hitlimit bun add @joint-ops/hitlimit Bun (Optimized)
For Bun applications, use the Bun-optimized package with native SQLite:
bun add @joint-ops/hitlimit-bun Optional Store Packages
Install additional stores as needed:
Redis Store
Install the ioredis peer dependency to use the Redis store:
npm install ioredis pnpm add ioredis yarn add ioredis SQLite Store (Node.js)
npm install better-sqlite3 pnpm add better-sqlite3 yarn add better-sqlite3 Requirements
- Node.js: v18.0.0 or higher
- Bun: v1.0.0 or higher
- TypeScript: v5.0 or higher (optional)
Next Steps
Now that you have hitlimit installed, head over to the Quick Start guide to set up your first rate limiter.