Nevertheless! Party Metaphorically

    express-brute-store-sequelize

    2.0.10 • Public • Published

    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.

    Install

    npm i express-brute-store-sequelize

    DownloadsWeekly Downloads

    727

    Version

    2.0.10

    License

    MIT

    Unpacked Size

    10 kB

    Total Files

    6

    Last publish

    Collaborators

    • ortex