Added .env.example

This commit is contained in:
Ayush Choudhary
2024-02-28 12:42:05 +00:00
parent 10ab4ad9eb
commit c3ee76a06b
3 changed files with 16 additions and 3 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
import { rateLimit } from "express-rate-limit";
import { config } from "dotenv";
config();
export const ratelimit = rateLimit({
windowMs: 30 * 60 * 1000,
max: 70,
windowMs: Number(process.env.WINDOWMS) || 30 * 60 * 1000,
max: Number(process.env.MAX) || 70,
legacyHeaders: true,
standardHeaders: "draft-7",
message: "Too many API requests, try again later",