jculveyhouse
CDCloudflare Developers
•Created by bdematt on 1/8/2024 in #pages-help
Access bindings in dev
I just tried this on a fresh project with
npm create cloudflare@latest -- --framework svelte
and it seems to be working7 replies
CDCloudflare Developers
•Created by bdematt on 1/8/2024 in #pages-help
Access bindings in dev
for reference, here's the PR: https://github.com/sveltejs/kit/pull/11732/files#diff-55dd33c380314b0ebda94b3dea7190b010f2fb9824c7303ecf7d994d7df04ac1R147
7 replies
CDCloudflare Developers
•Created by bdematt on 1/8/2024 in #pages-help
Access bindings in dev
Bindings should work in dev out of the box. In late January (not sure of the specific version but can look it up if needed) Svelte changed the Cloudflare adapter to use
getBindingsProxy
which will automatically emulate any bindings defined in your wrangler.toml
when running vite dev
in a svelte project7 replies
CDCloudflare Developers
•Created by Brandon Pittman on 4/9/2024 in #pages-help
Setting up bindings for KV and Qwik
Awesome, glad it worked. If you run into any more issue let us know 😄
11 replies
CDCloudflare Developers
•Created by Brandon Pittman on 4/9/2024 in #pages-help
Setting up bindings for KV and Qwik
11 replies
CDCloudflare Developers
•Created by Brandon Pittman on 4/9/2024 in #pages-help
Setting up bindings for KV and Qwik
If you're starting from scratch, you can run
npm create cloudflare@latest -- --framework qwik
. Out of the box it will provide a wrangler.toml
including bindings examples. Uncomment the KV example and run build-cf-types
to regenerate a type definition for the platform
object and it will include your KV11 replies
CDCloudflare Developers
•Created by Brandon Pittman on 4/9/2024 in #pages-help
Setting up bindings for KV and Qwik
Can you give
await platform.env["MY_KV_NAMESPACE"]
a shot?11 replies