core icon indicating copy to clipboard operation
core copied to clipboard

DurableObjects support

Open lucadalli opened this issue 1 year ago • 5 comments

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.

lucadalli avatar Apr 05 '24 16:04 lucadalli

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 avatar Apr 06 '24 17:04 atinux

@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.

lucadalli avatar Apr 07 '24 11:04 lucadalli

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!

atinux avatar Apr 09 '24 16:04 atinux

Adding https://github.com/kwhitley/itty-durable as I like how they define DO.

atinux avatar Jun 20 '24 06:06 atinux

Cloudflare Workers now support static assets. This provides a clear way forward to support DurableObjects by deploying via Workers instead of Pages. Hurrah!

lucadalli avatar Sep 27 '24 18:09 lucadalli

@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 🤌🏻

tahirmahmudzade avatar Nov 03 '24 09:11 tahirmahmudzade

@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 🤌🏻

+1

saikksub avatar Dec 03 '24 03:12 saikksub

@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 🤌🏻

+1

ever-mira avatar Dec 06 '24 22:12 ever-mira

@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 🤌🏻

+1

+1

fenagel avatar Feb 06 '25 10:02 fenagel

Durable Object support is coming soon 😮 https://bsky.app/profile/atinux.com/post/3lgt54qvsnh23

RihanArfan avatar Feb 08 '25 13:02 RihanArfan

I'm looking forward to it 💚

yusufalitangoz avatar Mar 01 '25 22:03 yusufalitangoz

Aaaand it's out! 🚀 NuxtHub can now deploy to Cloudflare Workers, now supports realtime features powered by Nitro WebSocket & crossws using Durable Objects under the hood.

Read our changelog and take a look at our realtime docs:

  • https://hub.nuxt.com/changelog/workers
  • https://hub.nuxt.com/docs/features/realtime

RihanArfan avatar Apr 15 '25 00:04 RihanArfan