diff --git a/astro.config.mjs b/astro.config.mjs index a7fd9c2..7226624 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,7 @@ import tailwindcss from '@tailwindcss/vite'; const host = process.env.HOST || 'localhost'; const port = process.env.PORT || '4321'; +const apiUrl = process.env.API_URL || 'http://127.0.0.1:3000'; export default defineConfig({ site: process.env.SITE_URL || `http://${host}:${port}`, @@ -15,5 +16,10 @@ export default defineConfig({ vite: { plugins: [tailwindcss()], + server: { + proxy: { + '/api': apiUrl, + }, + }, }, }); \ No newline at end of file