Zetax
Explore posts from serversCDCloudflare Developers
•Created by Zetax on 7/26/2024 in #general-help
Durable object websocket close not working
4 replies
CDCloudflare Developers
•Created by Zetax on 7/22/2024 in #general-help
Cloudflare pages nextjs project can't run development server
Hey there, I just tried getting started with a new NextJS project with Cloudflare pages by just using this create command:
npm create cloudflare@latest my-next-app -- --framework=next
But after installing and running the "npm run dev" command in the project directory, I just get this error and the dev server doesn't start:
3 replies
CDCloudflare Developers
•Created by Zetax on 6/9/2024 in #general-help
How do I store websocket connections for later use?
Hey there, I just got started with Durable objects and thought I would be able to use them to store long lived websocket connections, but it seems I was mistaken. It works when I don't put the Connections in storage, but if I don't do that, the list of connected clients disappears after about 30 seconds even if the websocket connection stays active, which breaks my route that checks if the list of clients is empty and sends a mesasge to all of them if it isn't.
Edit: After I thought about it for a bit with my sleep deprived brain I noticed that you of course can't store Websocket connections in Durable objects for obvious reasons, but is there any other way to keep the same list of Clients globally and be able to send messages from the worker they are connected to? As this is needed for my program
Am I understanding something about Durable objects wrong? I could really need some help 😬
My code: https://gist.github.com/simplyzetax/de4b9f4d3edaa1c30ff7cf6521199c3f
1 replies
CDCloudflare Developers
•Created by Zetax on 6/8/2024 in #general-help
Only lower latency with Warp with worker
3 replies
CDCloudflare Developers
•Created by Zetax on 2/3/2024 in #general-help
Weirdly long response times
3 replies
CDCloudflare Developers
•Created by Zetax on 11/6/2023 in #workers-help
NodeJS compat not working
13 replies