Skip to content
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

🚀 Add new SvelteKit+ DO (with local dev support) example #5164

Closed
dario-piotrowicz opened this issue Mar 5, 2024 · 2 comments
Closed
Labels
templates Issue with a workers-sdk template

Comments

@dario-piotrowicz
Copy link
Member

Describe the solution

Note

This is a follow up from this issue in our docs repo: cloudflare/cloudflare-docs#13062 (comment)

In our Template & Examples directory let's add a new example for a project using SvelteKit with a DurableObject binding and showcase how that can work both locally and in production.

As mentioned in the docs issue I've already created the example here: https://github.com/dario-piotrowicz/sveltekit-durable-object-local-usage-example this could just be copied to our examples but ideally before doing so I think that we should:

  • add a script there to also do the deployment of both the worker and the SvelteKit app (for now it only has a dev script)
  • generally polishing the code
  • adding a proper README
  • the example now uses the handle hook hack, ideally we should wait for the proper SvelteKit local dev support and use that in the example instead

Additionally there are a couple of questions that I'd love to hear people thoughts about:

  • could/should we somehow generalize the example to use a generic full stack framework (instead of specifically target SvelteKit)?
  • are our examples discoverable enough? is anyone every going to find this? if not, could we make them more discoverable? (by for example adding a link (or multiple links) in our docs)?
@admah
Copy link
Contributor

admah commented Mar 6, 2024

could/should we somehow generalize the example to use a generic full stack framework (instead of specifically target SvelteKit)?

It seems like frameworks are all different (and opinionated) enough to make that a hard task. Generalizing the template might make less sense to developers familiar with the way a framework does things, which would mean it's usage would probably be less. Just some initial thoughts.

are our examples discoverable enough? is anyone every going to find this? if not, could we make them more discoverable? (by for example adding a link (or multiple links) in our docs)?

I think we could add links within our own docs, as well as links within the framework's docs (ie. https://kit.svelte.dev/docs/adapter-cloudflare). I'm sure there are other places as well?

I've also wondered if we should move workers-sdk back to the cloudflare/templates repo for visibility?

@penalosa
Copy link
Contributor

We no longer recommend users use these templates to get started with projects, as they're generally very out of date. For up to date project templates, you can refer to https://developers.cloudflare.com/workers/get-started/quickstarts/ & for tutorials you can refer to https://developers.cloudflare.com/workers/tutorials/

@penalosa penalosa closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
templates Issue with a workers-sdk template
Projects
None yet
Development

No branches or pull requests

3 participants