1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-18 15:08:24 +00:00

add cloudflare worker example

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2023-08-12 10:22:54 -04:00
parent 201548b75a
commit 1e82289e81
Failed to extract signature
3 changed files with 62 additions and 0 deletions

6
cf-worker/script.js Normal file
View file

@ -0,0 +1,6 @@
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" } }));
});