@ghbountybot/db-vercel-postgres
TypeScript icon, indicating that this package has built-in type declarations

3.22.2 • Public • Published

Payload Postgres Adapter

Vercel Postgres adapter for Payload.

Installation

npm install @payloadcms/db-vercel-postgres

Usage

Explicit Connection String

import { buildConfig } from 'payload'
import { vercelPostgresAdapter } from '@payloadcms/db-vercel-postgres'

export default buildConfig({
  db: vercelPostgresAdapter({
    pool: {
      connectionString: process.env.DATABASE_URI,
    },
  }),
  // ...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.

Readme

Keywords

none

Package Sidebar

Install

npm i @ghbountybot/db-vercel-postgres

Weekly Downloads

5

Version

3.22.2

License

MIT

Unpacked Size

52.9 kB

Total Files

39

Last publish

Collaborators

  • simplyalec