astro.config.ts raw

   1  import { defineConfig } from 'astro/config';
   2  import node from '@astrojs/node';
   3  
   4  export default defineConfig({
   5    output: 'static',
   6    adapter: node({ mode: 'standalone' }),
   7    server: { port: 3000 },
   8    vite: {
   9      server: {
  10        proxy: {
  11          '/api': {
  12            target: 'http://localhost:3001',
  13            changeOrigin: true,
  14            rewrite: (path) => path.replace(/^\/api/, ''),
  15          },
  16        },
  17      },
  18    },
  19  });
  20