omfj
omfj
Explore posts from servers
SSolidJS
Created by omfj on 7/14/2024 in #support
How do get Cloudflare bindings in dev?
I am struggling to access my Cloudflare bindings in devleopment using Solid Start. I created the project using create-cloudflare.
import { getRequestEvent } from "solid-js/web";

export const getContext = () => {
const event = getRequestEvent()!;
console.log(JSON.stringify(event.nativeEvent.context.cloudflare, null, 2));
};
import { getRequestEvent } from "solid-js/web";

export const getContext = () => {
const event = getRequestEvent()!;
console.log(JSON.stringify(event.nativeEvent.context.cloudflare, null, 2));
};
This works when running pnpm preview, but returns undefined when running in dev (vinxi dev). I suspect there might be a bug in Vinxi or maybe I have to add something to my dev command? Does anyone have experience with this?
3 replies
CDCloudflare Developers
Created by omfj on 5/29/2024 in #workers-help
Worker can't bind to EU bucket
When deploying my worker it says it finds the bucket, but when I then go to the settings of the worker in the dashboard it says there is no R2 buckets bound to the worker. If I try to update the environment variables of the worker I get the following error message: "workers.api.error.bucket_not_found (Code: 10085)". Any idea why this is?
...

[[r2_buckets]]
binding = "R2"
bucket_name = "avatars"
jurisdiction = "eu"

...
...

[[r2_buckets]]
binding = "R2"
bucket_name = "avatars"
jurisdiction = "eu"

...
2 replies