Jürgen Leschner
Jürgen Leschner
CDCloudflare Developers
Created by Jürgen Leschner on 9/17/2024 in #durable-objects
DO multi-worker example?
7 replies
CDCloudflare Developers
Created by Jürgen Leschner on 9/17/2024 in #durable-objects
DO multi-worker example?
Thank so much @kian - that's the part i was missing 🙏 ... I was looking here and was distracted by "environments" instead of focusing on the worker name.
7 replies
CDCloudflare Developers
Created by Jürgen Leschner on 9/17/2024 in #durable-objects
DO multi-worker example?
(sorry for the messy thread 😊 )
7 replies
CDCloudflare Developers
Created by Jürgen Leschner on 9/17/2024 in #durable-objects
DO multi-worker example?
or maybe rephrasing: Does all DO access have to go through the same worker implementation as the DO class?
7 replies
CDCloudflare Developers
Created by Jürgen Leschner on 9/17/2024 in #durable-objects
DO multi-worker example?
Another way to ask the question maybe: How do I avoid maintaining DO class (callee) code and worker (caller) code in a single worker?
7 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
PS - I answered your environment variable question in the community forum.
10 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
alternatively, you could add export const prerender = true; to the relevant .astro file.
10 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
10 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
to test this, try changing to output: 'hybrid' .
10 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
@Sgal I suspect that you are hitting this astro issue https://discord.com/channels/830184174198718474/1276586107869466726/1279006502442635309 The cloudflare astro adapter sets the rendering mode to server. This causes errors with templates which were not tested with SSR (like the blog template) I would suggest not using SSR unless you have to.
10 replies
CDCloudflare Developers
Created by PneuTueur on 8/26/2024 in #workers-help
Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations
Hi @PneuTueur I had the same issue, and got around it by ignoring the TypeScript error with a comment // @ts-expect-error.
https://github.com/jldec/presskit/blob/main/packages/worker/src/index.tsx#L21-L25 (It's not the most satisfying - please post back here if you find a better solution - e.g. in https://github.com/honojs/hono/issues/1127)
3 replies
CDCloudflare Developers
Created by Sgal on 8/23/2024 in #workers-help
Difference deploy behavior from wrangler CLI and Cloudflare website.
Hi @Sgal I see identical responses (404) from those 2 urls with /blog/. - https://be758b82.balanced-chef.pages.dev/blog/ - https://fe5e61f6.balanced-chef.pages.dev/blog/ b.t.w. if your site is all static, I would suggest not using the @astrojs/cloudflare adapter. Cloudflare Pages is quite happy serving the static build without workers. https://docs.astro.build/en/guides/integrations-guide/cloudflare/
If you’re using Astro as a static site builder, you don’t need an adapter.
10 replies
CDCloudflare Developers
Created by h on 8/22/2024 in #workers-help
KV Put takes forever to write, or does not write at all
🙂 happens to the best of us lol
7 replies
CDCloudflare Developers
Created by Gagan Suie on 8/21/2024 in #workers-help
Is there a way to combine dev and prod workers projects?
aah, right, workers for each wrangler environment have different names and show up separately in the workers dashboard. I haven't tried it yet, but there is a new experimental "versions & deployments" feature which lets you deploy and route traffic to different versions. That might be a cleaner way to do staged worker testing. https://developers.cloudflare.com/workers/configuration/versions-and-deployments
4 replies
CDCloudflare Developers
Created by yinks on 8/19/2024 in #workers-help
No loader is configured for ".node" files
Hi @yinks , it looks like re2 depends on custom C++ code compiled with node-gyp which (afaik) won't work in cloudflare workers. https://github.com/uhop/node-re2/wiki/Notes-on-building-alternatives#the-current-implementation You may have more luck with the wasm version.
3 replies
CDCloudflare Developers
Created by Gagan Suie on 8/21/2024 in #workers-help
Is there a way to combine dev and prod workers projects?
Hi @Gagan Suie there's an example of configuring worker environments in https://developers.cloudflare.com/workers/wrangler/environments/
4 replies
CDCloudflare Developers
Created by Artucuno on 8/21/2024 in #workers-help
Decompressing large .gz file
Hi @Artucuno, if you run into subrequest limits when streaming and calling the D1 client api from your worker, you might consider using D1 import which can upload and then import larger SQL files. https://developers.cloudflare.com/api/operations/cloudflare-d1-import-database
4 replies
CDCloudflare Developers
Created by ShaharMS on 8/20/2024 in #pages-help
Run a nodejs script right before website is deployed to transform the website's content
no worries - good luck
17 replies
CDCloudflare Developers
Created by ShaharMS on 8/20/2024 in #pages-help
Run a nodejs script right before website is deployed to transform the website's content
17 replies