hapi-ratelimit
A simple ip based rate limiting plugin for Hapi using Redis.
Installation
npm install hapi-ratelimit
Usage
In the Hapi init code:
var Hapi = ;var hratelimit = ;var server = Hapi;var rateOpts = redis:port:#redis-port# host:#redis-host# namespace:"clhr" //namespace for redis keys global: limit: 200 duration: 60 //Set limit to -1 or leave out global to disable global limit //The global limit is not given priority over local limits;server;serverpack;