airtoxin / express-detect-burst

abnormal access detection middleware of express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#express-detect-burst npm version

abnormal access detection middleware of express.

Install

NPM

Usage

var burst = require( 'express-detect-burst' );

// if over 100 request arrived in 60000 milisecond (1 min)
// callback called
app.use( burst( {
    threshold: 100,
    interval:  60000,
    callback:  function () {
        console.log( 'burst' );
    }
} ) );

About

abnormal access detection middleware of express

License:MIT License


Languages

Language:JavaScript 100.0%