2026-09-09 09:02:46 +00:00
|
|
|
import { buildConfig } from "payload";
|
|
|
|
|
import { postgresAdapter } from "@payloadcms/db-postgres";
|
2026-09-09 09:53:07 +00:00
|
|
|
import { HomeContent } from "./src/collections/HomeContent.ts";
|
|
|
|
|
import { Media } from "./src/collections/Media.ts";
|
|
|
|
|
import { Products } from "./src/collections/Products.ts";
|
|
|
|
|
import { SiteSettings } from "./src/collections/SiteSettings.ts";
|
|
|
|
|
import { Users } from "./src/collections/Users.ts";
|
2026-09-09 09:02:46 +00:00
|
|
|
|
|
|
|
|
export default buildConfig({
|
|
|
|
|
admin: { user: Users.slug },
|
|
|
|
|
collections: [Users, Products, Media],
|
|
|
|
|
globals: [SiteSettings, HomeContent],
|
|
|
|
|
secret: process.env.PAYLOAD_SECRET || "development-only-change-me",
|
2026-09-09 11:08:41 +00:00
|
|
|
routes: { admin: "/cms/admin", api: "/cms/api" },
|
2026-09-09 09:02:46 +00:00
|
|
|
db: postgresAdapter({ pool: { connectionString: process.env.DATABASE_URI || "" } }),
|
|
|
|
|
typescript: { outputFile: "./src/payload-types.ts" },
|
|
|
|
|
});
|