Skip to content

mattzcarey/cloudflare-examples

Repository files navigation

Cloudflare Worker and Durable Object Monorepo Examples

typesafe and fun

Examples

Durable Object

  • State persistence
  • SQLite database
  • Object storage
  • WebSocket connection
  • Request/Response with rpc

Worker to Worker

  • worker A server using hono
  • rpc communication with worker B
  • worker B uses worker entrypoint

Cyclical Worker

  • worker entrypoint
  • spawn the same worker recursively
  • make a bunch of outgoing connections in parallel

TODO: Cyclical Worker to Worker

  • might be an antipattern. Deployment is a pain and will probs need be in two stages. You get an error deploying a worker with a non existent binding.

Mini hacks and bugs

Setting the ports for the workers in the dev scripts allows you to run all the workers locally with npm run dev.


Thanks to @threepointone for all the help getting setup.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published