gammatools/web/config.js

11 lines
343 B
JavaScript
Raw Normal View History

// 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));