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
|
import { buildConfig } from "payload";
import { postgresAdapter } from "@payloadcms/db-postgres";
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import path from "path";
import { fileURLToPath } from "url";
import { Users } from "./collections/Users";
import { Articles } from "./collections/Articles";
import { Services } from "./collections/Services";
import { Testimonials } from "./collections/Testimonials";
import { Media } from "./collections/Media";
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
export default buildConfig({
admin: {
user: Users.slug,
meta: {
titleSuffix: " | Der-topogo Admin",
},
},
collections: [Users, Articles, Services, Testimonials, Media],
editor: lexicalEditor(),
secret: process.env.PAYLOAD_SECRET || "CHANGE-ME-IN-PRODUCTION",
typescript: {
outputFile: path.resolve(dirname, "payload-types.ts"),
},
db: postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URI || "",
},
}),
});
|