11 lines
343 B
JavaScript
11 lines
343 B
JavaScript
|
// config.js
|
||
|
let environment = window.location.hostname === 'parmenides' ? 'dev' : 'prod';
|
||
|
|
||
|
fetch('./config.json')
|
||
|
.then(response => response.json())
|
||
|
.then(config => {
|
||
|
window.BASE_URL = config[environment].BASE_URL;
|
||
|
console.log("BASE URL:", window.BASE_URL);
|
||
|
})
|
||
|
.catch(error => console.error('Error:', error));
|