1.0.4 • Published 2 years ago

@koex/ratelimit v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ratelimit

NPM version Coverage Status Dependencies Build Status license issues

ratelimit for koa extend

Install

$ npm install @koex/ratelimit

Usage

// See more in test
import ratelimit from '@koex/ratelimit';

import * as Koa from 'koa';
const app = new Koa();
app.use(ratelimit());
app.use(async (ctx) => {
  if (ctx.path === '/') {
    ctx.body = 'hello, world';
  } else if (ctx.path === '/json') {
    ctx.body = {
      name: 'name',
      value: 'value',
    };
  }
});

app.listen(8000, '0.0.0.0', () => {
  console.log('koa server start');
});

Related

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.13.37

4 years ago

0.13.36

4 years ago

0.13.34

4 years ago

0.13.23

4 years ago

0.13.22

4 years ago

0.13.21

4 years ago

0.13.20

4 years ago

0.13.6

4 years ago

0.13.7

4 years ago

0.13.8

4 years ago

0.13.9

4 years ago

0.13.24

4 years ago

0.13.29

4 years ago

0.13.28

4 years ago

0.13.11

4 years ago

0.13.10

4 years ago

0.13.16

4 years ago

0.13.15

4 years ago

0.13.14

4 years ago

0.13.13

4 years ago

0.13.19

4 years ago

0.13.18

4 years ago

0.13.17

4 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago