Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| A small Workers app to deploy on g1t.page | 1 | // /api says what this deployment was given; everything else is the site. |
| 2 | export default { | |
| 3 | async fetch(request, env) { | |
| 4 | const url = new URL(request.url); | |
| 5 | if (url.pathname === "/api") { | |
| 6 | return Response.json({ | |
| 7 | fromConfig: env.FROM_CONFIG ?? null, | |
| 8 | greeting: env.GREETING ?? null, | |
| 9 | // Only a prefix: enough to tell the test key from the live one. | |
| 10 | stripeKey: env.STRIPE_KEY ? `${env.STRIPE_KEY.slice(0, 8)}…` : null, | |
| 11 | }); | |
| 12 | } | |
| 13 | return env.ASSETS.fetch(request); | |
| 14 | }, | |
| 15 | }; |