UNPKG

@ancxkush/create-ts-express-mongo-starter-code

Version:

NodeJS/Express starter code with - TypeScript, MongoDB setup, Exception Handler, Logger, HTTP testing example, Swagger Docs example, Mongoose model example, JOI validation example, CRUD operations example

11 lines (8 loc) 284 B
import rateLimit from 'express-rate-limit' const rateLimiter = rateLimit({ windowMs: 15 * 60 * 1000, //15 minutes max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes) standardHeaders: true, legacyHeaders: false, }) export default rateLimiter