Skip to content

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

@dario-piotrowicz

Description

@dario-piotrowicz

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    templatesIssue with a workers-sdk template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions