enabled client-side static resource caching to improve frontend UX

feature/modern-browsers
Inga 🏳‍🌈 2 weeks ago
parent 06abd9883a
commit 7bba979de8
  1. 4
      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;
};

Loading…
Cancel
Save