Skip to content

fcmatteo/express-antiflood-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-antiflood-redis

A Redis store for express-antiflood

Usage

import antiflood from 'express-antiflood'
import RedisStore from 'express-antiflood-redis'

const store = RedisStore({
  host: 'localhost',
  port: 6379,
})

const middleware = antiflood(store)

You can check the example in this repo to watch it working.

Options

The options are directly passed to node_redis, so if no options are passed it will use defaults. You can use a pre-connected client by passing the option client. In that case all the other options will be ignored.

TODO

  • Add more tests
  • Improve nextDate field returned on the get method

About

A Redis store for express-antiflood

Resources

Stars

Watchers

Forks

Packages

No packages published