https://github.com/headblockhead/templ-cloudflare-workers
Templ's counters cloudfront example rewritten in cloudflare workers.
https://github.com/headblockhead/templ-cloudflare-workers
cloudflare cloudflare-kv cloudflare-workers templ
Last synced: 8 months ago
JSON representation
Templ's counters cloudfront example rewritten in cloudflare workers.
- Host: GitHub
- URL: https://github.com/headblockhead/templ-cloudflare-workers
- Owner: headblockhead
- Created: 2024-04-28T15:08:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T23:34:29.000Z (about 1 year ago)
- Last Synced: 2024-12-21T00:25:47.540Z (about 1 year ago)
- Topics: cloudflare, cloudflare-kv, cloudflare-workers, templ
- Language: Go
- Homepage: https://templ.headblockhead.com
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Templ in Cloudflare workers
An example/template project that uses Cloudflare's Workers and Pages service, along with a key-value store to host a templ app.
[SSE in action](https://github.com/user-attachments/assets/ee856356-7b9b-4970-9756-31e8b378b71f)
Features:
- Counters are updated without a full page reload.
- Queued requests so all button presses are counted.
- Worker compiled to web assembly.
- Uses `htmx` for interactivity, `templ` for page rendering, `tinygo` to compile for WASM and `wrangler` to deploy.
- SSE support - counter also updates globally without a reload.