-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thomasgauvin: First draft at KV tutorial to serve static & dynamic re… #15495
base: production
Are you sure you want to change the base?
Conversation
…sponses from KV assets
Deploying cloudflare-docs with
|
Latest commit: |
2eb06a3
|
Status: | ✅ Deploy successful! |
Preview URL: | https://cda6a150.cloudflare-docs-7ou.pages.dev |
Branch Preview URL: | https://thomasgauvin-kv-tutorials-pa.cloudflare-docs-7ou.pages.dev |
Files with changes (up to 15) |
Love this use-case of KV, but this is essentially Workers Sites, right? https://developers.cloudflare.com/workers/configuration/sites/ Is this something intended for folks to still be doing? What about Cloudflare Pages? Or the |
@Cherry, yep, this is essentially Workers Sites (some of the code in here is taken from Workers Sites & KV assets handler code). The intention is to show how KV can be used (without the KV assets handler abstraction) directly. It serves as a tutorial for a common use of KV to make it more easily discoverable from KV docs. There is a call-out at the top of https://e37d08d7.cloudflare-docs-7ou.pages.dev/kv/tutorials/workers-kv-to-serve-assets/ that indicates that Pages is the platform to use for serving assets of web applications.
I'll make sure to align with the roadmap for Workers Sites. It was also my intent to include https://github.com/cloudflare/workers-sdk/tree/85a22faa75c9d33e7790aa78e49e5c18982a179f/packages/kv-asset-handler as well, I'm just checking on that package's roadmap as well to make sure we have the right framing. |
Wondering if we want to call out dynamic content with Pages too? Pages isn't just static content, you can also serve dynamic content with Functions (and without needing to use a manual KV implementation). |
Considering that Workers Sites docs indicate 'Do not use Workers Sites for new projects.', I'm inclined to leave the PR as is (not including a mention of Workers Sites or kv-assets-handler). I will edit the Pages guidance to include the fact that it supports dynamic responses, but given folks land here for 'serving static assets for KV', I think the guidance from here to Pages for serving static assets for a web application is appropriate. |
…sponses from KV assets