diff --git a/src/index.ts b/src/index.ts index c85588b..8d456de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,12 +4,19 @@ import app from "./app.js"; const site = express(); +const maxAge = 1000 * 60 * 60 * 24 * 7; + nunjucks.configure("templates", { autoescape: true, express: site, }); -site.use(express.static(".")); +site.use( + express.static(".", { + maxAge: maxAge, + immutable: true, + }) +); site.get("/", app.index);