API URL per env setzen

This commit is contained in:
2025-08-13 07:14:04 +02:00
parent b7f22c2d5e
commit 1919d540fb
8 changed files with 38 additions and 2 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
import axios from 'axios'
const API = axios.create({
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:8180', // Use env variable with fallback
//baseURL: 'http://192.168.0.48:8180', // Replace with your backend URL
baseURL: 'http://localhost:8180', // Replace with your backend URL
//baseURL: 'http://localhost:8180', // Replace with your backend URL
})
// Request interceptor to add auth token