From 4ea7cea0ce4b4436cc967c2a1bd7913d5dcafd02 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 8 Feb 2024 15:14:55 +0100 Subject: [PATCH] chore: add a quick way to emulate api delay on localhost --- backend/src/api/routes/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/api/routes/index.ts b/backend/src/api/routes/index.ts index 957d41308..476c0d430 100644 --- a/backend/src/api/routes/index.ts +++ b/backend/src/api/routes/index.ts @@ -59,6 +59,12 @@ function addApiRoutes(app: Application): void { return next(); }); app.use("/configure", expressStatic(join(__dirname, "../../../private"))); + + //simulate delay for all requests + // app.use(async (req, res, next) => { + // await new Promise((resolve) => setTimeout(resolve, 1000)); + // next(); + // }); } addSwaggerMiddlewares(app);