ui: align js with api

This commit is contained in:
2026-06-03 01:30:38 +00:00
parent 007e61bca1
commit b29520c5af
4 changed files with 77 additions and 22 deletions
+4 -7
View File
@@ -1,17 +1,14 @@
import { defineConfig } from 'vite'
import { resolve } from 'path'
const API_URL = process.env.API_URL ?? 'http://192.168.56.1:3000'
const API_URL = process.env.API_URL ?? 'http://localhost:3000'
export default defineConfig({
define: {
__API_URL__: JSON.stringify(API_URL),
},
server: {
port: 5173,
proxy: {
'/api': {
target: API_URL,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
build: {
outDir: 'dist',