feat: rate limited endpoints

This commit is contained in:
Ritesh Ghosh
2023-08-07 20:42:42 +05:30
parent 3014ab8ce4
commit 5a82179174
+2
View File
@@ -4,6 +4,7 @@ import express, { Application } from "express";
import animeRouter from "./routes";
import { homePage } from "./controllers";
import { ratelimit } from "./config/ratelimit";
import errorHandler from "./config/errorHandler";
import notFoundHandler from "./config/notFoundHandler";
@@ -12,6 +13,7 @@ const PORT: number = env.PORT || 4000;
app.use(morgan("dev"));
app.use(ratelimit);
app.get("/", homePage);
app.use("/anime", animeRouter);