Răsfoiți Sursa

🔧 chore: Configure Vite server with proxy settings

- Add `server` configuration in `vite.config.ts`
- Enable `host: 0.0.0.0` for external access
- Setup proxy for `/api`, `/mj`, and `/pg` endpoints targeting `http://localhost:3000`
t0ng7u 3 luni în urmă
părinte
comite
836ae7affe
1 a modificat fișierele cu 17 adăugiri și 0 ștergeri
  1. 17 0
      web/vite.config.ts

+ 17 - 0
web/vite.config.ts

@@ -19,4 +19,21 @@ export default defineConfig({
       '@': path.resolve(__dirname, './src'),
     },
   },
+  server: {
+    host: '0.0.0.0',
+    proxy: {
+      '/api': {
+        target: 'http://localhost:3000',
+        changeOrigin: true,
+      },
+      '/mj': {
+        target: 'http://localhost:3000',
+        changeOrigin: true,
+      },
+      '/pg': {
+        target: 'http://localhost:3000',
+        changeOrigin: true,
+      },
+    },
+  },
 })