Migrate from SSG to SSR with @astrojs/node adapter so Sanity CMS changes are reflected immediately without rebuild. Separate ports for Astro SSR (4321) and Fastify API (3000) in production. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
375 B
JavaScript
18 lines
375 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import node from '@astrojs/node';
|
|
|
|
export default defineConfig({
|
|
output: 'server',
|
|
adapter: node({ mode: 'standalone' }),
|
|
outDir: './dist',
|
|
server: { port: 4321 },
|
|
vite: {
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://127.0.0.1:8888',
|
|
},
|
|
},
|
|
},
|
|
});
|