how to deploy DO with pages?

Hey this is really frustrating. I have a SvelteKit app and I made it so that ‘.svelte-kit/cloudflare/_worker.js’ exports my DO (class) But I cannot access it from my deployed sveltekit app ‘env.DO’ is undefined and can’t create any binding from the dashboard, it sends me to workers docs where they use wrangler.toml and that is not used by pages so please help me out…
9 Replies
PhilippV
PhilippVOP14mo ago
Like, I love the idea of workers (pages), DO etc. but so far DX has been not very good to put it nicely
Hello, I’m Allie!
You can only deploy DOs with Workers
PhilippV
PhilippVOP14mo ago
I see, so using the sveltekit workers adapter should get me there?
Hello, I’m Allie!
That, or just using Functions, then deploy your DO Code in a separate Worker Then you still get the benefit of free static Pages Requests
PhilippV
PhilippVOP14mo ago
ah okey. and once deployed via separate worker I should be able to bind it from the dash to my pages app?
Hello, I’m Allie!
That is correct
PhilippV
PhilippVOP14mo ago
I can work with that :) Maybe put that information somewhere in the docs how can mark this solved?
Hello, I’m Allie!
Got it
PhilippV
PhilippVOP14mo ago
<3
Want results from more Discord servers?
Add your server