Socket
Socket
Sign inDemoInstall

express-brute-lowdb

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-brute-lowdb

A lowdb storage adapter for express-brute middleware


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
1.70 MB
Created
Weekly downloads
 

Changelog

Source

[0.1.0] - 2018-05-05

  • Initial release

Readme

Source

GitHub release GitHub Release Date license

express-brute-lowdb

A lowdb storage adapter for express-brute middleware

Installation

via npm:

$ npm install express-brute-lowdb

via yarn:

$ yarn add express-brute-lowdb

Usage

const ExpressBrute = require('express-brute')
const LowdbStore = require('express-brute-lowdb');

const store = new LowdbStore();
const bruteforce = new ExpressBrute(store);

app.post('/auth',
  bruteforce.prevent,
  (req, res, next) => {
    res.send('Success!')
  }
);

Options

Available options:

NameTypeDescriptionRequired
prefixStringPrefix for each lowdb keyfalse
adapterFunctionlowdb adapter Constructorfalse
adapterArgsArrayArguments for adapter Constructorfalse
rootKeyStringname for database objects's root keyfalse

Example:

const Memory = require('lowdb/adapters/Memory') // or
const FileSync = require('lowdb/adapters/FileSync')

// defaults:
const options = {
  prefix: '',
  adapter: Memory, // only `Memory` & `FileSync` adapters are currently supported
  adapterArgs: ['express-brute.json'],
  rootKey: 'express-brute'
}

const store = new LowdbStore(options);

N.B.: lowdb's Memory adapter is not suitable for production usage

Changelog

Changelog for express-brute-lowdb

License

Licensed under the MIT License. Check the LICENSE file for details.

Keywords

FAQs

Last updated on 05 May 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc