1import { getEnv } from "waku";
2import { Card } from "../components/Card.tsx";
3import { Counter } from "../components/Counter.tsx";
4
5export default async function HomePage() {
6 // `getEnv` reads the server environment at request time — the portable
7 // way to reach env values from RSC page modules. On Prisma it is backed by
8 // the Prisma Compute runtime's `process.env`.
9 const greeting = getEnv("GREETING") ?? "Hello!";
10 return (
11 <div>
12 <h1 className="text-3xl font-bold">{greeting}</h1>
13 <Card
14 title="Styled with Tailwind CSS"
15 body="This card is a React component styled with Tailwind utilities."
16 />
17 <p className="mt-4 text-slate-600">
18 This page is rendered by the server on every request.
19 </p>
20 <Counter />
21 </div>
22 );
23}
24
25// Dynamic: rendered by the Prisma Compute runtime at request time.
26export const getConfig = async () => ({ render: "dynamic" }) as const;