Skip to content

ahmedhany/express-brute-waterline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Sequelize Store for express-brute

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 94.6%
  • Makefile 5.4%