File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed
templates/with-vercel-postgres Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ async function main() {
52
52
{
53
53
name : 'payload-vercel-postgres-template' ,
54
54
dirname : 'with-vercel-postgres' ,
55
- db : 'vercelPostgres ' ,
55
+ db : 'vercel-postgres ' ,
56
56
storage : 'vercelBlobStorage' ,
57
57
sharp : false ,
58
58
vercelDeployButtonLink :
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ payload-vercel-postgres-template
6
6
7
7
## Attributes
8
8
9
- - ** Database** : vercelPostgres
9
+ - ** Database** : vercel-postgres
10
10
- ** Storage Adapter** : vercelBlobStorage
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " template-blank-3.0 " ,
2
+ "name" : " payload-vercel-postgres-template " ,
3
3
"version" : " 1.0.0" ,
4
4
"description" : " A blank template to get started with Payload 3.0" ,
5
5
"license" : " MIT" ,
15
15
"start" : " cross-env NODE_OPTIONS=--no-deprecation next start"
16
16
},
17
17
"dependencies" : {
18
- "@payloadcms/db-mongodb " : " beta" ,
18
+ "@payloadcms/db-vercel-postgres " : " beta" ,
19
19
"@payloadcms/next" : " beta" ,
20
20
"@payloadcms/plugin-cloud" : " beta" ,
21
21
"@payloadcms/richtext-lexical" : " beta" ,
22
+ "@payloadcms/storage-vercel-blob" : " beta" ,
22
23
"cross-env" : " ^7.0.3" ,
23
24
"graphql" : " ^16.8.1" ,
24
25
"next" : " 15.0.0-canary.160" ,
25
26
"payload" : " beta" ,
26
27
"react" : " 19.0.0-rc-5dcb0097-20240918" ,
27
- "react-dom" : " 19.0.0-rc-5dcb0097-20240918" ,
28
- "sharp" : " 0.32.6"
28
+ "react-dom" : " 19.0.0-rc-5dcb0097-20240918"
29
29
},
30
30
"devDependencies" : {
31
31
"@types/node" : " ^22.5.4" ,
Original file line number Diff line number Diff line change 1
- // storage-adapter-import-placeholder
2
- import { mongooseAdapter } from '@payloadcms/db-mongodb' // database-adapter-import
1
+ import { vercelBlobStorage } from '@payloadcms/ storage-vercel-blob'
2
+ import { vercelPostgresAdapter } from '@payloadcms/db-vercel-postgres'
3
3
import { lexicalEditor } from '@payloadcms/richtext-lexical'
4
4
import path from 'path'
5
5
import { buildConfig } from 'payload'
6
6
import { fileURLToPath } from 'url'
7
- import sharp from 'sharp'
8
7
9
8
import { Users } from './collections/Users'
10
9
import { Media } from './collections/Media'
@@ -25,13 +24,17 @@ export default buildConfig({
25
24
typescript : {
26
25
outputFile : path . resolve ( dirname , 'payload-types.ts' ) ,
27
26
} ,
28
- // database-adapter-config-start
29
- db : mongooseAdapter ( {
30
- url : process . env . DATABASE_URI || '' ,
27
+ db : vercelPostgresAdapter ( {
28
+ pool : {
29
+ connectionString : process . env . POSTGRES_URL || '' ,
30
+ } ,
31
31
} ) ,
32
- // database-adapter-config-end
33
- sharp,
34
32
plugins : [
35
- // storage-adapter-placeholder
33
+ vercelBlobStorage ( {
34
+ collections : {
35
+ [ Media . slug ] : true ,
36
+ } ,
37
+ token : process . env . BLOB_READ_WRITE_TOKEN || '' ,
38
+ } ) ,
36
39
] ,
37
40
} )
You can’t perform that action at this time.
0 commit comments