| 1 | import type { APIRoute } from "astro"; |
| 2 | |
| 3 | export const GET: APIRoute = ({ request }) => |
| 4 | Response.json({ |
| 5 | name: new URL(request.url).searchParams.get("name") ?? "visitor", |
| 6 | greeting: process.env.GREETING ?? "Hello!", |
| 7 | }); |