const rateLimit = require('express-rate-limit'); const apiLimiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes max: 100, // Limit each IP to 100 requests per windowMs message: { error: "Too many requests", message: "You have exceeded the 100 requests in 15 mins limit!" }, standardHeaders: true, legacyHeaders: false, }); module.exports = { apiLimiter };