payload-plugin-scheduler
Version:
Scheduled posts plugin for PayloadCMS
15 lines (11 loc) • 370 B
text/typescript
import dotenv from 'dotenv'
import { resolve } from 'path'
import { start } from '../src/server'
module.exports = async function () {
dotenv.config({
path: resolve(__dirname, '../.env'),
})
// https://payloadcms.com/docs/local-api/overview#nextjs-conflict-with-local-api
const payload = await start({ local: true })
globalThis.payloadClient = payload
}