1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-06 23:12:22 +00:00
terraform-playground/cf-worker/script.js
Jason Hall 1e82289e81
add cloudflare worker example
Signed-off-by: Jason Hall <jason@chainguard.dev>
2023-08-12 10:22:54 -04:00

6 lines
224 B
JavaScript

addEventListener("fetch", (event) => {
console.log("Hello from the service worker!");
let value = KV.get("foo");
event.respondWith(new Response(value,
{ headers: { "content-type": "text/plain" } }));
});