Issue
I am facing one challenge in my PAAS application. I have two app services
- Angular App Service
- Dot Net App Service
I need to create deployment slot for each app service. And requirement is that Angluar slot app service should call Dotnet slot app service not original dotnet app service.
Original angluar app service continue calls Original dotnet app service.
How can I achieve that with any configuration in app service or some where else
For example
Define url Variable in configuration of each angular app service and read in angular then one question raises:
How to use/read environment variable of azure app service in angular?
Store variable/URL some where in app service and read easily in angular. is there any way to do that?
Solution
Cannot read environment variable of server side( azure app service environment also) because it is client side application . There is way :- Configuration setting can be getting by calling one API and get all details including environment variables. For Example
But Used different approach like this
url of original angular = "xyz"
url of slot angular = "abc"
So logic look like this
url_of_apiApp = "";
if (url == "xyz")
{
url_of_apiApp = "urloforiginaldotnetapi";
}
else if (url == "abc")
{
url_of_apiApp = "urlofslotdotnetapi";
}
Answered By - Pradeep Kumar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.