New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-brute-store-sequelize

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-brute-store-sequelize

Sequelize store for module express-brute

2.0.10
latest
Source
npm
Version published
Maintainers
1
Created
Source

express-brute-store-sequelize

Sequelize store for module express-brute

Install

npm install express-brute-store-sequelize

Example

const ExpressBruteStore = require('express-brute-store-sequelize');
const ExpressBrute = require('express-brute');
const Sequelize = require('sequelize');

const bruteOptions =  {
  freeRetries: 5,
  proxyDepth: 1,
  minWait: 2000, 
  maxWait: 2000, 
  lifetime : 2,     
  attachResetToRequest : false,
  refreshTimeoutOnRequest : false
}

const bruteStoreOptions = {
  tableName: 'ExpressBrute', // this is a default name
  fields: { key: Sequelize.STRING }, // you can merge model fields
  modelOptions: { timestamps: false } // you can merge model options
};

const sequelize = new Sequelize();
const bruteStore = new ExpressBruteStore(sequelize, bruteStoreOptions);
const brute = new ExpressBrute(bruteStore, bruteOptions);

Sequelize model is created after sequelize.sync()

You can find the model in store.model

More

This transport has own method .clean([lifetime], [callback])

You can clean the old data via this.clean(ms), filtering by "updateAt" field.

Keywords

brute

FAQs

Package last updated on 01 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts