Chinoman10
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
Oh since I never heard of it I just kinda ignored it 😅🙏
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
So I'm guessing you didn't know that
pages dev
did the bindings for you?
How were you accessing the DO from within the Pages then?31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
You can see I'm getting the OAUTH_KV from env, which comes from the request.
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
As long as they are declared in the wrangler.toml, yup!
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
Well the binding is done with wrangler, which I've posted.
Then whenever there's a GET/POST request, the ctx is provided which has the request, the env, the waitUntil util function, etc.
The env has the bindings.
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
Sure, I'll try that tomorrow morning 👍
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
I'm not sure I follow? What's the issue with using D1 or KV without a framework?
All the code is in the 'functions' folder, which is kinda like a Worker, so 🤷♂️
Everything works fine. KV's are a bit wonky on localhost, but D1's work magnificently well. Makes me love DB's when I previously hated their guts (got PTSD from prev. jobs).
31 replies
CDCloudflare Developers
•Created by Chinoman10 on 7/27/2024 in #durable-objects
I have the weirdest situation going
This is the pages wrangler:
And this is the worker's wrangler.toml:
I truncated the IDs and removed most vars.
31 replies