superapp
BackendDatabases

Vercel Postgres

Connect via Vercel's managed Postgres.

Chat in Claude

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/postgres

How 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.local

Connection Options

OptionTypeDescription
connectionStringstringOverride the auto-detected URL (optional)

On this page