20 lines
608 B
JavaScript
20 lines
608 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config'
|
|
import node from '@astrojs/node'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
// SSR so pages can fetch live content from Payload's REST API on each request.
|
|
export default defineConfig({
|
|
output: 'server',
|
|
adapter: node({ mode: 'standalone' }),
|
|
server: {
|
|
host: true,
|
|
port: Number(process.env.PORT) || 4321,
|
|
},
|
|
vite: {
|
|
// Read the single root .env (shared with docker-compose) instead of a
|
|
// per-app copy. PUBLIC_* vars are exposed to the client from here.
|
|
envDir: fileURLToPath(new URL('../../', import.meta.url)),
|
|
},
|
|
})
|