1const rateLimit = require('express-rate-limit');
2
3const limiter = rateLimit({
4 max: 100,
5 windowMs: 60 * 60 * 1000,
6 message: 'too many requests sent by this ip, please try again in an hour !'
7});
8
9app.use('<routes>', limiter); // eg: app.use('/api', limiter);