Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including limitrr with all npm packages installed. Try it out:

var limitrr = require("limitrr")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

limitrr v5.1.2

Rate limiting for Express using Redis.

chae

NodeJS rate limiting and response delaying using Redis - includes Express middleware.

Official Documentation (limitrr.js.org)

Limitrr assists with the rate-limiting and "delaying of responses" for various routes within your NodeJS application. Unlike other similar packages, this utility allows the user to limit not only by the number of requests but also the number of completed actions (e.g allowing a certain amount of accounts to be successfully created within a timespan) and have such restricted with custom options. As well as this, custom discriminators are possible - you no longer have to limit by just the user's IP. Limitrr can also delay responses after a certain amount of requests have been made - you don't have to just rate-limit potentially malicious requests, you can delay them instead or as well as. Included also within this package are various middleware functions for Express. However, the core functions work perfectly fine if you're not using such a package and chose to do something else, instead.

I've effectively released a similiar limitrr library, but in PHP. Check it out here

If you appreciate this project, please 🌟 it on GitHub.

Pull Requests are welcomed

Roadmap

  • [x] Create multiple route limits (separate expiry times e.t.c) without having to initialize the Limitrr class multiple times
  • [x] Return headers to user with rate limiting details - how many requests/actions remain before restrictions are put in place, how long before the values expire and how many requests/actions are allowed per that route.
  • [x] Unit Tests
  • [x] Pass parameters into functions via an object
  • [x] Ability to slow down responses after a certain amount of requests
  • [x] Extend options further to allow things like IP exclusion (asides from just local).

Documentation

Access the documentation here: https://limitrr.js.org

Contributors

This project exists thanks to all the people who contribute.

License

FOSSA Status

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free