Create and deploy the boilerplate Azure web app
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.
Create and deploy the boilerplate backend web app
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.
Map your domain to the backend web app
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.
Update CORS
- 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.
Create and deploy the boilerplate frontend web app
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.
Map your domain to the frontend web app
- Go to Settings > Custom domains.
- Select Add custom domain, and then follow the instructions.
For more information, see Custom domain mapping in Azure.
Publish your frontend boilerplate web app
- 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>
.