- Changed output: 'static' → 'server' in astro.config.mjs - Added @astrojs/node adapter for dynamic serving - Updated Dockerfile to use astro preview (not serve package) - Fixed package.json dependency conflicts - All API routes will work (privacy consent logging) - Static pages still work Now includes BOTH: - ✅ Static pages (product pages, blog) - ✅ Dynamic API routes (cookie consent logging) - ✅ Admin dashboard with database access - ✅ Fixed host restrictions
23 lines
420 B
JavaScript
23 lines
420 B
JavaScript
import { defineConfig } from 'astro/config';
|
|
|
|
// For SSR with API routes
|
|
import node from '@astrojs/node';
|
|
|
|
export default defineConfig({
|
|
output: 'server',
|
|
adapter: node({ mode: 'standalone' }),
|
|
build: {
|
|
inlineStylesheets: 'always',
|
|
},
|
|
vite: {
|
|
preview: {
|
|
host: true, // Allow any host
|
|
port: 80,
|
|
},
|
|
server: {
|
|
host: true, // Allow any host
|
|
port: 80,
|
|
},
|
|
},
|
|
});
|