![]() Right-click on the TodoApp.Data project, then select Add > Class.Įnter Constants.cs as the name, then select Add. If you used azd up to provision and deploy the service, the Constants.cs file was created for you and you can skip this step. Your client application needs to know the base URL of your backend so that it can communicate with it. Select the service you created earlier (in the quickstart resource group), then select Publish. Right-click the TodoAppService.NET6 project, then Publish > Publish to Azure. Wait for the NuGet package restoration to complete. ![]() Right-click the TodoApp solution, then select Restore NuGet Packages. Open the TodoApp.sln in Visual Studio 2022 for Mac. Use Visual Studio 2022 for Mac to deploy the service code to the newly created Azure App Service.ĬLI, proceed with the manual steps.Add /tables/todoitem?ZUMO-API-VERSION=3.0.0 to the URL: Once the backend service is published, a browser is opened. Select Publish to publish your app to the Azure App Service you created earlier. Select the quickstart database, then select Next.įill in the form using the SQL username and password that were in the outputs of the deployment, then select Next. Select Azure SQL Database, then select Next. Locate the Service Dependencies and select the triple-dots next to the SQL Server Database, then select Connect. Once the publish profile creation process has completed, select Close. If necessary, sign in and select an appropriate Subscription name.Įxpand the quickstart resource group, then select the App Service that was created earlier. Select Specific target: Azure App Service (Windows), then press Next. In the Publish window, select Target: Azure, then press Next. On the top menu, select Build > Publish TodoAppService.NET6. ![]() Right-click the TodoAppService.NET6 project, then select Set as Startup Project. In the right-hand pane, select the Solutions Explorer. Make a note of each of the values in the outputs for later use. Once the deployment is complete, get the output variables as these hold important information you need later on: az deployment group show -g quickstart -n azuredeploy -query properties.outputs You need it later on when accessing the database. Pick a strong password for your SQL Administrator password. Ensure you use the same name and region wherever they're mentioned in this tutorial.Ĭreate the resources using a group deployment: az deployment group create -g quickstart -template-file azuredeploy.json -parameters sqlPassword=MyPassword1234 You can select any region that you wish, providing you can create resources there. This command creates the quickstart resource group in the West US region. This directory also contains azuredeploy.json.Įnsure you've signed in and selected a subscription using the Azure CLI.Ĭreate a new resource group: az group create -l westus -g quickstart Open a terminal and change directory to the folder containing the TodoApp.sln file. If you don't wish to use the Azure DeveloperĬLI, proceed with the manual steps. If you have completed the steps with the Azure Developer CLI, proceed to the next step. You can run the azd env get-values command to see the SQL authentication information should you wish to access the database directly. Finally, the Azure Developer CLI writes an appropriate Constants.cs file for you. The Azure Developer CLI then provisions the necessary resources and deploys the service code to the Azure You're then be prompted for a subscriptionĪnd Azure region to use. If you aren't already signed-in to Azure, the browser launches to ask you to sign-in. Open a terminal and change directory to the folder containing the TodoApp.sln file.To complete all steps (provisioning and deploying): The TodoApp sample is configured to support the Azure Developer CLI. Use the Azure Developer CLI to complete all steps Use Visual Studio to deploy the service code to the newly created Azure App Service.Provision an Azure App Service and Azure SQL Database to Azure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |