env variables handling

This commit is contained in:
cpu
2025-03-31 01:26:50 +02:00
parent c2e7bd5f1e
commit 51a1be22d2
15 changed files with 209 additions and 106 deletions

View File

@@ -154,6 +154,9 @@
</div>
</div>
<!-- Load environment configuration first -->
<script src="/config.env.js"></script>
<!-- Main application script -->
<script type="module" src="/js/app.js"></script>
<script>
@@ -214,7 +217,7 @@
let backendUrl;
try {
const configModule = await import('/js/config.js');
backendUrl = configModule.BACKEND_URL;
backendUrl = configModule.getBackendUrl();
} catch (error) {
output.textContent = 'Failed to load backend URL. Please check configuration.\n';
return;