Cloudflare Durable Objects
I am looking to deploy a simple solidstart app on cloudflare with bindings for durable objects. There are a few github issues from 2023 but they seem to be pretty out of date. Has anyone implemented this successfully?
Here is the error I am getting when I try to deploy:
My solidstart config looks like this:
and my entry-server.tsx file looks like this:
3 Replies
i haven't tried this with solidstart, only tanstack start. but what i did was create two workers, one for start, and one for the do. then i used the cloudflare vite plugin to start up both at the same time and have integration. https://developers.cloudflare.com/workers/vite-plugin/
great idea thank you
Hey @alexmarmon, I'm attempting the same thing at the moment and got it working with just
in the app config and then forwarding requests to the durable object in the server function
However this doesn't work if the server function is invoked during SSR as the request will be for the page being rendered and not the server function invocation which I've asked a question about here
The
cloudflare-durable preset does inject a helper function durableFetch into the context for forwarding requests to the durable object, but it hard codes the object name for some reason. I guess whoever wrote it only needed a single durable object which IMO kinda defeats the purpose