Open lucadalli opened 7 months ago
Hey @lucadalli
Yes this is planned! I want to use them for many reasons and the biggest one being sockets broadcasting.
As Pages does not support direct bindings we need to create another worker for accessing durable objects.
@Atinux Super exciting stuff!
I believe Pages does support bindings to production and preview deployments via the Cloudflare dashboard. In my Pages project dashboard I see the possibility to bind to DurableObjects defined in a separate workers project. So perhaps it would suffice to create another worker to define the DurableObjects, but binding to and accessing the DurableObjects can be done from Pages project.
If you have a small demo I would love to see how you achieved it, haven't got the time to look at it yet!
Adding https://github.com/kwhitley/itty-durable as I like how they define DO.
Cloudflare Workers now support static assets. This provides a clear way forward to support DurableObjects by deploying via Workers instead of Pages. Hurrah!
@atinux any improvement on this yet? nuxt hub is amazing, been working with it for a while but now i would like to introduce real time chat functionality on my website, would be amazing to see Durable Object support in action 🤌🏻
As a heavy Cloudflare user that is returning back to Nuxt after using other meta-frameworks, I am very excited about this project.
The greatest struggle I face when working with Cloudflare is that meta frameworks tend to provide no support/tooling/abstractions for DurableObjects and I have to set up an entirely new project with
wrangler
.Would be an absolute game changer to be able to have my DurableObject definitions living inside my Nuxt project.