From 16cce4152c27632e98c27c42740723949608799c Mon Sep 17 00:00:00 2001 From: wangdl Date: Sat, 27 Jun 2026 12:55:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Astro=20=E5=BC=80=E5=8F=91=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=20API=20=E4=BB=A3=E7=90=86=E5=88=B0=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=20:3000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astro.config.mjs | 6 ++++++ 1 file changed, 6 insertions(+) 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