Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
31 lines
646 B
Plaintext
31 lines
646 B
Plaintext
# Payload Postgres Adapter
|
|
|
|
Official Postgres adapter for [Payload](https://payloadcms.com).
|
|
|
|
- [Main Repository](https://github.com/payloadcms/payload)
|
|
- [Payload Docs](https://payloadcms.com/docs)
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npm install @payloadcms/db-postgres
|
|
```
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { buildConfig } from 'payload'
|
|
import { postgresAdapter } from '@payloadcms/db-postgres'
|
|
|
|
export default buildConfig({
|
|
db: postgresAdapter({
|
|
pool: {
|
|
connectionString: process.env.DATABASE_URL,
|
|
},
|
|
}),
|
|
// ...rest of config
|
|
})
|
|
```
|
|
|
|
More detailed usage can be found in the [Payload Docs](https://payloadcms.com/docs/configuration/overview).
|