-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayload.config.ts
More file actions
35 lines (32 loc) · 1000 Bytes
/
payload.config.ts
File metadata and controls
35 lines (32 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { buildConfig } from "payload";
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import { vercelPostgresAdapter } from "@payloadcms/db-vercel-postgres";
import path from "path";
import { fileURLToPath } from "url";
import sharp from "sharp";
import { Users } from "./collections/Users";
import { Posts } from "./collections/Posts";
import { Media } from "./collections/Media";
import { Tags } from "./collections/Tags";
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
export default buildConfig({
admin: {
user: "users",
importMap: {
baseDir: path.resolve(dirname),
},
},
collections: [Users, Posts, Media, Tags],
editor: lexicalEditor(),
secret: process.env.PAYLOAD_SECRET || "CHANGE-ME-IN-PRODUCTION",
typescript: {
outputFile: path.resolve(dirname, "payload-types.ts"),
},
db: vercelPostgresAdapter({
pool: {
connectionString: process.env.DATABASE_URI || "",
},
}),
sharp,
});