tsl-express-brute-sequelize

0.1.3 • 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.

Package Sidebar

Install

npm i tsl-express-brute-sequelize

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

6.94 kB

Total Files

5

Last publish

Collaborators

  • kyushiro