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