Central Instance - UI Tech documentation
Frontend Apps can be Deployed in Direct state-specific environments and Central instances.
By default,
Frontend Applications run as a State Specific environment, So if we have to deploy the UI Builds to a central instance Environment then we have to do the following step.
In the Globalconfig file, we should have
var centralInstanceEnabled = true;
var stateTenantId = 'in.stateb'
Sample global config file contents
var globalConfigs = (function () {
var stateTenantId = 'in.stateb'
var gmaps_api_key = 'AIzaSyAQOd09-vjmk1sXFb_ZQYDz2nlfhXq7Wf8'
var finEnv = 'dev'
var centralInstanceEnabled = true;
var footerBWLogoURL = 'https://s3.ap-south-1.amazonaws.com/egov-dev-assets/digit-footer-bw.png'
var footerLogoURL = 'https://s3.ap-south-1.amazonaws.com/egov-dev-assets/digit-footer.png'
var digitHomeURL = 'https://www.digit.org/'
var getConfig = function (key) {
if (key === 'STATE_LEVEL_TENANT_ID') {
return stateTenantId;
}
else if (key === 'GMAPS_API_KEY') {
return gmaps_api_key;
}
else if (key === 'FIN_ENV') {
return finEnv;
} else if (key === 'ENABLE_SINGLEINSTANCE') {
return centralInstanceEnabled;
} else if (key === 'DIGIT_FOOTER_BW') {
return footerBWLogoURL;
} else if (key === 'DIGIT_FOOTER') {
return footerLogoURL;
}else if (key === 'DIGIT_HOME_URL') {
return digitHomeURL;
}
};
return {
getConfig
};
}());
GlobalConfigs File,
https://egov-central-instance-assets.s3.ap-south-1.amazonaws.com/statebglobalConfigs.js
What Happens if centralInstanceEnabled = true
For Each Network call it sends the state tenant as tenantId &tenantId=in.stateb
It doenst add if url has the tenantId Already.