BackendDatabases
Vercel Postgres
Connect via Vercel's managed Postgres.
Connect to Vercel Postgres using the @vercel/postgres SDK.
import { createEngine } from '@superapp/backend'
import { vercelPostgresProvider } from '@superapp/backend/databases/vercel-postgres'
const engine = createEngine({
providers: [vercelPostgresProvider],
connections: {
main: { type: 'vercel-postgres' },
},
})Install
npm install @vercel/postgresHow It Works
The Vercel Postgres SDK reads connection credentials from the POSTGRES_URL environment variable automatically when deployed on Vercel. No connection string needed in the config.
For local development, add the Vercel env vars to .env.local:
npx vercel env pull .env.localConnection Options
| Option | Type | Description |
|---|---|---|
connectionString | string | Override the auto-detected URL (optional) |