add env var

This commit is contained in:
2026-03-31 20:37:12 +02:00
parent 551b5a2658
commit 0b379d1331
15 changed files with 125 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import axios from 'axios';
const API_URL = 'http://localhost:3001/api';
const BACKEND_URL = process.env.REACT_APP_BACKEND_URL || 'http://localhost:3001';
const API_URL = `${BACKEND_URL}/api`;
export async function getServices() {
const response = await axios.get(`${API_URL}/services`);