In this section, you'll learn how to deploy your frontend application to Azure App Service using an Azure DevOps project. I will demonstrate the necessary steps for deploying an Angular application, but you can use the same approach for other SPA frameworks.
As a prerequisite, create a new App Service and a new Azure DevOps project in the way I demonstrated earlier in this chapter.
By default, the App Service you create will take the request URL and match it to a file. Since Angular (and other SPA frameworks) use an internal router to match the URL to a page, you need to make Azure App Service aware of that.
- Create a new file with the name
web.config
in thesrc
folder of your Angular project and write the following XML in it:
<configuration> <system.webServer> <rewrite> <rules> <rule name="redirect...