express-brute-sequelize

0.1.0 • Public • Published

Sequelize store for express-brute

Sequelize(MySQL) store adapter for the express-brute.

Installation

npm install express-brute-sequelize

Usage

var ExpressBrute = require('express-brute');
var SequelizeStore = require('express-brute-sequelize');
var Sequelize = require('sequelize');
 
var sequelize = new Sequelize('test', 'root', 'root', {
  host: "127.0.0.1",
  dialect: "mysql",
  logging: false
});
 
new SequelizeStore(sequelize, 'bruteStore', {}, function(store) {
    var bruteforce = new ExpressBrute(store);
    app.post('/session',
        bruteforce.prevent, // error 403 if too many requests for this route in short time
        function(req, res, next){
            res.send('Success!');
        }
    );
});
 

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Install

npm i express-brute-sequelize

DownloadsWeekly Downloads

89

Version

0.1.0

License

MIT

Unpacked Size

7.03 kB

Total Files

5

Last publish

Collaborators

  • maddy2get