@payloadcms/db-vercel-postgres
v3.84.1
Published
Vercel Postgres adapter for Payload
Maintainers
Keywords
Readme
Payload Postgres Adapter
Vercel Postgres adapter for Payload.
Installation
npm install @payloadcms/db-vercel-postgresUsage
Explicit Connection String
import { buildConfig } from 'payload'
import { vercelPostgresAdapter } from '@payloadcms/db-vercel-postgres'
export default buildConfig({
db: vercelPostgresAdapter({
pool: {
connectionString: process.env.DATABASE_URL,
},
}),
// ...rest of config
})Automatic Connection String Detection
Have Vercel automatically detect from environment variable (typically process.env.POSTGRES_URL)
export default buildConfig({
db: postgresAdapter(),
// ...rest of config
})More detailed usage can be found in the Payload Docs.
