feat: live preview (#3382)

This commit is contained in:
Jacob Fletcher
2023-10-02 11:40:08 -04:00
committed by GitHub
parent ec0f5a77b7
commit a53cbd146f
79 changed files with 2173 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import path from 'path'
import { v4 as uuid } from 'uuid'
import payload from '../packages/payload/src'
import { startLivePreviewDemo } from './live-preview/startLivePreviewDemo'
dotenv.config()
@@ -60,6 +61,12 @@ const startDev = async () => {
externalRouter.use(payload.authenticate)
if (testSuiteDir === 'live-preview') {
await startLivePreviewDemo({
payload,
})
}
expressApp.listen(3000, async () => {
payload.logger.info(`Admin URL on http://localhost:3000${payload.getAdminURL()}`)
payload.logger.info(`API URL on http://localhost:3000${payload.getAPIURL()}`)