UNPKG
get-express-starter
Version:
latest (3.2.2)
3.2.2
3.2.0
3.1.0
3.0.0
2.1.2
2.1.1
2.0.1
1.1.1
1.1.0
1.0.0
0.1.0
Get production ready express boilerplate with a single command
get-express-starter
/
templates
/
node-express-boilerplate
/
src
/
middlewares
/
rate-limiter.js
12 lines
(9 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
rateLimit
=
require
(
'express-rate-limit'
);
const
authLimiter
=
rateLimit
({
windowMs
:
15
*
60
*
1000
,
max
:
20
,
skipSuccessfulRequests
:
true
, }); module.exports = { authLimiter, };