From 7bba979de803d04e668ad3d69f7316ff211ff5a8 Mon Sep 17 00:00:00 2001 From: Inga Date: Sun, 17 Nov 2024 22:38:10 +0000 Subject: [PATCH] enabled client-side static resource caching to improve frontend UX --- src/backend/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/app.ts b/src/backend/app.ts index aa21d6f..1f4f353 100644 --- a/src/backend/app.ts +++ b/src/backend/app.ts @@ -9,8 +9,8 @@ export const createApp = () => { app.use(bodyParser.urlencoded({ extended: true })); app.use("/", createProgressiveForm(mainPageHandler)); - app.use("/frontend", express.static(path.join(import.meta.dirname, "..", "frontend"))); - app.use("/shared", express.static(path.join(import.meta.dirname, "..", "shared"))); + app.use("/frontend", express.static(path.join(import.meta.dirname, "..", "frontend"), { maxAge: 60_000 })); + app.use("/shared", express.static(path.join(import.meta.dirname, "..", "shared"), { maxAge: 60_000 })); return app; };