title | description | author | ms.author | ms.topic | ms.custom | ms.date |
---|---|---|---|---|---|---|
Create and deploy the boilerplate Azure web app |
Learn about how to create and build the boilerplate Azure web app as a Microsoft Fabric sample. |
KesemSharabi |
kesharab |
how-to |
05/21/2024 |
To create and deploy the boilerplate Azure web app, you need to create and deploy the backend and frontend web apps. This tutorial provides instructions for creating and deploying the boilerplate backend and frontend web apps.
Make sure that you review the workload cloud setup tutorial before you deploy your backend and frontend web apps.
-
In the Azure portal, create a web app resource.
-
Enter or select the relevant information:
- For Publish, select Code.
- For Runtime stack, select .NET 7 (STS) and Windows.
For general instructions, see Get started with Azure App Service.
-
Go to Settings > Custom domains.
-
Select Add custom domain, and then follow the instructions.
For more information, see Custom domain mapping in Azure.
-
In Visual Studio, open your backend boilerplate solution.
-
Right-click the boilerplate project and select Publish.
-
For the target, select Azure.
-
Sign in with a user who has access to the Azure web app you created.
-
Use the UI to locate the relevant subscription and resource group, and then follow the instructions to publish.
- On the overview pane of your web app in the Azure portal, go to API > CORS.
- Under Allowed Origins, add your frontend web app URL.
-
In the Azure portal, create a web app resource.
-
Enter or select the relevant information:
- For Publish, select Code.
- For Runtime stack, select Node 18 LTS and Windows.
For general instructions, see Quickstart for Node.js in Azure App Service.
- Go to Settings > Custom domains.
- Select Add custom domain, and then follow the instructions.
For more information, see Custom domain mapping in Azure.
- Build your frontend boilerplate by running
npm run build:test
. - Go to the Microsoft-Fabric-developer-sample\Frontend\tools\dist folder.
- Select all files and the asset folder under
dist
, and create a .zip file of the selected files. - Open PowerShell.
- In PowerShell, run
Connect-AzAccount
and sign in with a user who has access to the Azure web app you created. - Run
Set-AzContext -Subscription "<subscription_id>"
. - Run
Publish-AzWebApp -ResourceGroupName <resource_group_name> -Name <web_app_name> -ArchivePath <zip_file_path>
.