Skip to content
A Loki.js store for Express-Brute
Branch: master
Clone or download

Latest commit


Type Name Latest commit message Commit time
Failed to load latest commit information.
lib fix: moment ref + sid assign Nov 25, 2017
tests Initial version Aug 22, 2016
.gitignore Initial version Aug 22, 2016
.snyk Initial version Aug 22, 2016
.travis.yml Initial version Aug 22, 2016
LICENSE Initial commit Aug 21, 2016 Release version Aug 22, 2016
index.js Release version Aug 22, 2016
package.json chore: updated pkg version Nov 25, 2017


NPM version Build Status Codacy Badge Dependency Status Known Vulnerabilities License

A Loki.js store for Express-Brute


npm install express-brute-loki


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);'/auth',
    bruteforce.prevent, // error 403 if we hit this route too often
    function (req, res, next) {


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

Available parameters:

  • path Path to the database file. Defaults to ./brute-store.db
  • autosave Set false to disable save to disk. Defaults to true
  • ttl Duration in seconds to keep entries. Set to 0 to disable TTL. Defaults to 0
  • logErrors Whether or not to log client errors. Defaults to false
    • If true, a default logging function (console.error) is provided.
    • If a function, it is called anytime an error occurs (useful for custom logging)
    • If false, no logging occurs.



You can’t perform that action at this time.