Home

Awesome

express-brute-loki

NPM version Build Status Codacy Badge Dependency Status Known Vulnerabilities License

A Loki.js store for Express-Brute

Installation

npm install express-brute-loki

Usage

var ExpressBrute = require('express-brute'),
    ExpressBruteLokiStore = require('express-brute-loki');

var store = new ExpressBruteLokiStore({
    path: './brute.db' // See all available options below
});
var bruteforce = new ExpressBrute(store);

app.post('/auth',
    bruteforce.prevent, // error 403 if we hit this route too often
    function (req, res, next) {
        res.send('Success!');
    }
);

Options

Setting the path to the database file is optional but recommended.

Available parameters:

License

MIT