You can connect to your Basalt database in three ways. Which one you want depends on where your code runs and how long each client stays connected.
Method | Best for | Port |
|---|---|---|
Direct | Long-running servers, migrations | 5432 |
Pooler, session mode | Servers that need prepared statements | 5432 |
Pooler, transaction mode | Serverless and edge functions | 6543 |
Not sure? Use transaction mode. It works everywhere and survives traffic spikes.
Find your connection string
Open Project settings → Database and copy the string for the mode you want.
psql "postgresql://postgres.abcd1234:[PASSWORD]@eu-west.pool.basalt.run:6543/postgres"