rate-limiter-captcha

0.6.9 • Public • Published

Rate-limiter-captcha

Node.js Module to Guard Web-Site with fastify and rate-limiter-captcha

js-semistandard-style Build status Coverage Dependency Status Greenkeeper badge

This module is a hybrid of fastify and several rate-limiter modules. shorter codes and more realistic ddos ​​protection will be here. This place is still under construction. so please be understanding. Thank you users. If you want to contact me, instagram : marijua.cpp

Install

npm i rate-limiter-captcha

Saving the request module as a dependency is compulsory.

# Pin the request version
npm install --save request

Usage

In this section, we will write which port we will listen to. short and concise code

const limiter = require('rate-limiter-captcha');

limiter.listen(1337);

In this section, we write the content and extension of the 'port we listen to' of the website.

const limiter = require('rate-limiter-captcha');

limiter.listen(1337);
limiter.page('/about','About us bla bla bla...');
node application.js

Here, we actually get rid of long lines. As rate-limiter-captcha we have not come to our core yet. We are inspired by several places. but here we shorten our codes quite a bit. and we fully comply with the concept of clean code.

Here, the first parameter is how many total requests can be sent in 1 minute? will be the answer to your question. we say 10 as an example.

const limiter = require('rate-limiter-captcha');

limiter.basicRateLimiter(10); // 10 is max request for 1 minute. ' 1 MİNUTE !!! '

Coming soon

Package Sidebar

Install

npm i rate-limiter-captcha

Weekly Downloads

2

Version

0.6.9

License

MIT

Unpacked Size

1.59 MB

Total Files

233

Last publish

Collaborators

  • marijua