Files
NetAlertX/front/js/api.js
2026-01-09 14:20:25 +11:00

15 lines
342 B
JavaScript

function getApiBase()
{
apiBase = getSetting("BACKEND_API_URL");
if(apiBase == "")
{
const protocol = window.location.protocol.replace(':', '');
const host = window.location.hostname;
const port = getSetting("GRAPHQL_PORT");
apiBase = `${protocol}://${host}:${port}`;
}
return apiBase;
}