@nexusts/limiter
v0.9.4
Published
Rate limiting (fixed / sliding / token-bucket)
Downloads
1,858
Readme
@nexusts/limiter
NexusTS — Bun-native fullstack framework
Description
Rate limiting (fixed / sliding / token-bucket).
3 strategies × 2 storage backends (memory, Drizzle). Per-IP, per-user, per-API-key. For multi-pod deployments use the Drizzle backend.
Install
This module is part of the NexusTS monorepo. Each module is published as its own npm package under the @nexusts/ scope.
Most apps start with just the core:
bun add @nexusts/coreThen add this module only if you need it:
bun add @nexusts/limiterPeer dependencies
None. No external dependencies for the memory backend. The Drizzle backend uses @nexusts/drizzle if installed.
Usage
import { /* public API */ } from "@nexusts/limiter";See the user guide and the example app for a working demo.
License
MIT — see the root LICENSE.
