Mike J
Explore posts from serversCDCloudflare Developers
•Created by Bamboo on 5/11/2023 in #workers-help
Connecting to CockroachDB serverless using pg via workers
The error I get on deploy is
The package "net" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
5 replies
CDCloudflare Developers
•Created by Bamboo on 5/11/2023 in #workers-help
Connecting to CockroachDB serverless using pg via workers
Great! Thanks. QQ - I am trying to deploy using Astro (so pages rather than a Worker). I want to use
pg
in an API route like below.
Where do I specify I want to use Node compatibility? I see Settings -> Functions -> Compatibility flags in the dashboard UI. I guess I am not clear on
1. Do I just add node_compat
in the UI? (or is it nodejs_compt
)
2. Have I actually understood the process correctly that an Astro API route will be converted to a Pages Function?
5 replies
CDCloudflare Developers
•Created by Bamboo on 5/11/2023 in #workers-help
Connecting to CockroachDB serverless using pg via workers
This is out now, correct?
https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets
and
https://developers.cloudflare.com/workers/tutorials/postgres/
5 replies