Initial commit: MVP scaffolding for Line of Sight application
- React frontend with MapLibre integration - Node.js Express backend with dummy API - Docker containerization (PostgreSQL+PostGIS, backend, frontend) - Interactive map with direction selector - 20 mock conurbations data - Full project structure ready for PR workflow
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:3001/api';
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: API_BASE_URL,
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
export const getLineOfSight = async (lat, lon, direction, tolerance) => {
|
||||
const response = await api.get('/line-of-sight', {
|
||||
params: { lat, lon, direction, tolerance }
|
||||
});
|
||||
return response;
|
||||
};
|
||||
|
||||
export const healthCheck = async () => {
|
||||
const response = await api.get('/health');
|
||||
return response;
|
||||
};
|
||||
|
||||
export default { getLineOfSight, healthCheck };
|
||||
Reference in New Issue
Block a user