10 lines
272 B
JavaScript
10 lines
272 B
JavaScript
import axios from 'axios';
|
|
|
|
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`);
|
|
return response.data;
|
|
}
|