Exercise 1: Provisioning a Web API
In this exercise, you will learn how to provision and deploy a sample web API application to the Azure App Service platform. The application will be used in later tasks as a backend application for APIM. Let’s start deploying a sample web API to get the weather forecast. The following steps should be executed in Bash to help you build and publish a website. It will use ZIP deployment and is required to compress files for deployment.
Note
This exercise can be implemented with PowerShell if Bash does not work in your environment.
The full code is available at the following link: https://packt.link/XVXbo
- Define a unique name for your application to avoid conflicts in Azure.
appName=apim-backend-$RANDOM
- Create a resource group in the East US region.
az group create -l eastus -n APIM-RG
- Set up your hosting environment with an App Service plan and a web app instance configured for .NET 7.
az appservice plan create -n $appName...