I have a web app with Angular and .NET 5 and I want to host it on 2 different Azure App Service (one for the Test environment and one for Prod).
I have followed the page https://angular.io/guide/build and created the following environments:
The web app I'm publishing from Visual Studio from a.pubxml file (I have 2 different ones for each app service).
How can I configure the App Services to use separate Angular environment variables? For example:
App service A -> environment.test.ts
App service B -> environment.prod.ts
I assume there should be some additional changes done to package.json and some to the .NET web project.
Try the below steps if it helps to fix the issue:
project.json
file > publishOptions
section > include a new application setting called appsetting.{env}.json
.ASPNETCORE_ENVIRONMENT
and set it.For more steps, follow this Configuration with Azure App Services and ASP .NET Core
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.