1---
2// Zero-config sessions: no session driver is configured anywhere in this
3// fixture — the integration defaults to the Cloudflare KV driver (binding
4// "SESSION"), auto-injects a local KV namespace in dev, and the live preview
5// provides a miniflare KV namespace.
6// The stylesheet import produces a content-hashed /_astro/ asset for the
7// immutable Cache-Control smoke test.
8// oxlint-disable-next-line import/no-unassigned-import
9import "../styles/session.css";
10
11export const prerender = false;
12
13const count = ((await Astro.session?.get("count")) ?? 0) + 1;
14Astro.session?.set("count", count);
15---
16
17<html lang="en">
18 <head>
19 <meta charset="utf-8" />
20 <title>Session</title>
21 </head>
22 <body>
23 <h1>Session</h1>
24 <p id="count">{count}</p>
25 </body>
26</html>