cosbgn
Explore posts from serversDTDrizzle Team
•Created by cosbgn on 3/25/2025 in #help
What does .all() do?
Half of the examples here: https://orm.drizzle.team/docs/joins use .all() at the end and half don't. There is no doc or anything mentioning .all() - Can someone please tell me?
6 replies
DTDrizzle Team
•Created by cosbgn on 3/22/2025 in #help
joins overwrite select?
Am I crazy or this is not supposed to happen?
My schema is:
When I do:
Data get's mixup, owner_id is assigned to pet id and also the names
1 replies
CDCloudflare Developers
•Created by cosbgn on 2/5/2025 in #workers-help
Why CF doesn't cache this worker?
Can someone help me figure out why this worker never gets cached:
https://oparse.com/api/cache
The response correctly sets
cache-control max-age=60, stale-while-revalidate=60
(you can see it in the browser inspector)
Yet from both logs ad DR flare extension I can see the response is never cached. What am I doing wrong?
The worker is:
9 replies
CDCloudflare Developers
•Created by cosbgn on 12/29/2024 in #workers-help
email worker `send to a worker` - can I select a specific path?
I have a worker which handles a lot of things, it's a hono api backend.
Can I send email to a specific endpoint?
3 replies
CDCloudflare Developers
•Created by cosbgn on 12/19/2024 in #workers-help
How to cache workers with static assets (beta)?

10 replies
DTDrizzle Team
•Created by cosbgn on 12/9/2024 in #help
D1 Remote in localhost?
Has anyone figured out how to connect to the production d1 DB in localhost? in wrangler is enough to add
--remote
2 replies
Please help me understand why cloudflare can't connect to postgres on nuxt
So postgres works on cloudflare workers, but with nuxt it can't connect. My guess is that it has to do with sockets. Is there a way to debug better this error? This is a quick reproduction:
Nuxt: https://github.com/cosbgn/pg-cloudflare/blob/main/server/api/test.js
or: https://github.com/cosbgn/pg-cloudflare/blob/main/server/api/psql.js
DB_PASSWORD: Please DM (it's a demo PSQL)
Try it locally with:
and:
With just nuxt dev it works perfectly, it's only on workers that it hungs and timesout.
Any help is very appreciated!
1 replies
CDCloudflare Developers
•Created by cosbgn on 10/5/2024 in #pages-help
Postgres timesout on cloudflare:
I have a PG db at digital ocean, it works perfectly in my local machine, however when deployed on cf I get:
write CONNECT_TIMEOUT localhost:5432
which is weird as the port is not even 5432
.
This is a reprodution: https://github.com/cosbgn/pg-cloudflare/blob/main/server/api/test.js
This is where it times out: https://pg-cloudflare.pages.dev/api/test
Please DB me for the DB connection string and I'll share that. If someone has any idea on why it doesn't work on CF I would love it.
P.s. IP are unlocked on all location.14 replies
Best nitro hook to kill a DB connection?
I would like to use hyperdrive which from their docs requires to clean up the client using
waitUntil
:
I would like to avoid doing this in each route, so I'm thinking a plugin is the right wait, should I use afterResponse
?
Something like;
1 replies
CDCloudflare Developers
•Created by cosbgn on 9/26/2024 in #pages-help
All my .env variables seem suddenly undefined. Did something change internally?

22 replies
How would you store a ref of an external packages in a state (useState)
I have this:
handleSubmit
is a method and messages
is a ref()
.
How can I wrap this in useState
to be able to call handleSubmit
and access messages from any component and keep the state alive on route change?7 replies
DTDrizzle Team
•Created by cosbgn on 9/10/2024 in #help
Any way to use D1 remote DB (production one) while locally?
On wrangler is enough to add --remote but not sure how it works on drizzle
1 replies
DTDrizzle Team
•Created by cosbgn on 9/4/2024 in #help
generated columns reference another table
I have a table called users and another called teams. I would like to have users.plan be generated from teams.id === user.team_id and from that team get teams.plan. So pretty much user.plan is generated from the right team plan.
Is this possible?
2 replies
CDCloudflare Developers
•Created by cosbgn on 8/16/2024 in #pages-help
Is there any way to access a pages deployment without passing first from the cloudflare CDN?
My issue is that the cloudflare CDN has a 100 second timeout and I need a long running backend task. Pages doesn't support crons or queues, so I can rely on an external cron tool, but I would need to connect directly to the worker skipping the CDN
4 replies