/express-detect-burst

abnormal access detection middleware of express

Primary LanguageJavaScriptMIT LicenseMIT

#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' );
    }
} ) );