mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-07-01 03:26:03 +00:00
fixes
This commit is contained in:
+11
-2
@@ -2,6 +2,10 @@ import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
|
||||
// Get backend URL from environment or use default
|
||||
const BACKEND_URL = process.env.VITE_BACKEND_URL || 'http://localhost:8080'
|
||||
const FRONTEND_PORT = parseInt(process.env.VITE_PORT || '5173')
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
@@ -10,10 +14,15 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
port: FRONTEND_PORT,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
target: BACKEND_URL,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/ws': {
|
||||
target: BACKEND_URL.replace('http', 'ws'),
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user