How do I use "the connection pooler"?

On the docs for Supabase, it says "Connect to your database using the Connection Pooler for serverless environments" but without elaborating. How do I do this? The postgres package does talk about it, but it doesn't seem to mention anything about how to do that vs a direct connection
1 Reply
Kasper
KasperOP2y ago
I'm assuming I'm doing it wrong because when building I get this error in Cloudflare:
11:55:22.342 node_modules/postgres/src/connection.js:1:16: ERROR: Could not resolve "net"
11:55:22.342 node_modules/postgres/src/connection.js:2:16: ERROR: Could not resolve "tls"
11:55:22.342 node_modules/postgres/src/connection.js:3:19: ERROR: Could not resolve "crypto"
11:55:22.342 node_modules/postgres/src/connection.js:4:19: ERROR: Could not resolve "stream"
11:55:22.343 node_modules/postgres/src/index.js:1:15: ERROR: Could not resolve "os"
11:55:22.342 node_modules/postgres/src/connection.js:1:16: ERROR: Could not resolve "net"
11:55:22.342 node_modules/postgres/src/connection.js:2:16: ERROR: Could not resolve "tls"
11:55:22.342 node_modules/postgres/src/connection.js:3:19: ERROR: Could not resolve "crypto"
11:55:22.342 node_modules/postgres/src/connection.js:4:19: ERROR: Could not resolve "stream"
11:55:22.343 node_modules/postgres/src/index.js:1:15: ERROR: Could not resolve "os"

Did you find this page helpful?