# express-quota-limiter ## Docs - [express-quota-limiter: quota middleware for Express](https://express-quota-limiter.mintlify.app/introduction.md): express-quota-limiter enforces long-window quotas in Express apps — monthly email limits, daily API budgets — with swappable Redis or in-memory storage. - [Quickstart: add quota limiting to Express in minutes](https://express-quota-limiter.mintlify.app/quickstart.md): Install express-quota-limiter, choose a storage driver, and attach your first quota middleware to an Express route in under five minutes. - [Quota keys: scoping limits by tenant, user, or route](https://express-quota-limiter.mintlify.app/concepts/quota-keys.md): Learn how keyGenerator lets you scope quota limits to any dimension—tenant, user, route, or a combination—using a plain string key. - [Storage drivers: Redis and in-memory quota backends](https://express-quota-limiter.mintlify.app/concepts/drivers.md): Understand how RedisDriver and MemoryDriver work, when to use each, and how to implement a custom QuotaStorage backend for any data store. - [Request weighting: charge variable quota per request](https://express-quota-limiter.mintlify.app/concepts/weighting.md): Use the quotaWeight option to deduct more than one unit of quota per request, so bulk operations like sending 100 emails count accurately. - [Enforce multi-tenant quotas with dynamic per-plan limits](https://express-quota-limiter.mintlify.app/guides/multi-tenant.md): Scope quota keys per tenant and resolve per-request limits from your database to enforce different quotas across free and paid plans. - [Track quota usage with onQuotaChecked and onQuotaExceeded](https://express-quota-limiter.mintlify.app/guides/callbacks.md): Use onQuotaChecked and onQuotaExceeded callbacks to sync remaining quota to your database, emit metrics to Datadog, and fire billing alerts. - [Testing quota middleware in isolation with MemoryDriver](https://express-quota-limiter.mintlify.app/guides/testing.md): Use the built-in MemoryDriver to write fast, isolated unit and integration tests for quota middleware without a Redis instance or external dependencies. - [Build a custom storage driver for any database backend](https://express-quota-limiter.mintlify.app/guides/custom-driver.md): Implement the QuotaStorage interface to back express-quota-limiter with any database or cache — MySQL, PostgreSQL, DynamoDB, or any custom store. - [createQuotaLimiter() — Express quota middleware factory](https://express-quota-limiter.mintlify.app/reference/create-quota-limiter.md): Full reference for createQuotaLimiter: options, behavior, error responses, and storage error handling for the Express quota limiter middleware. - [Storage drivers: RedisDriver and MemoryDriver reference](https://express-quota-limiter.mintlify.app/reference/drivers.md): Complete reference for RedisDriver and MemoryDriver — constructors, options, and methods for the express-quota-limiter storage backends. - [TypeScript types and interfaces for express-quota-limiter](https://express-quota-limiter.mintlify.app/reference/types.md): Complete TypeScript type definitions for express-quota-limiter: QuotaStorage, QuotaResult, QuotaOptions, LimitResolver, and callback context interfaces. - [Quota-Remaining header and HTTP 429 error response format](https://express-quota-limiter.mintlify.app/reference/response-headers.md): Reference for the Quota-Remaining and Quota-Limit headers and the JSON body returned on HTTP 429 when a quota is exceeded in Express. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.