We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98af059 commit e110859Copy full SHA for e110859
.gitignore
136 Bytes
frontend/src/api.js
@@ -1,12 +1,7 @@
1
import axios from 'axios';
2
3
-// Determine if we're in production by checking the hostname
4
-const isProduction = window.location.hostname === '79.76.48.165';
5
-
6
-// Create axios instance with base URL based on environment
7
-const API_BASE_URL = isProduction
8
- ? 'http://79.76.48.165:8080'
9
- : 'http://localhost:8080';
+// Create axios instance with base URL from environment variable
+const API_BASE_URL = process.env.REACT_APP_API_BASE_URL || 'http://localhost:8080';
10
11
const api = axios.create({
12
baseURL: API_BASE_URL,
0 commit comments