You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/static-web-apps/deploy-blazor.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ ms.custom: engagement-fy23
6
6
author: craigshoemaker
7
7
ms.service: static-web-apps
8
8
ms.topic: tutorial
9
-
ms.date: 10/11/2022
9
+
ms.date: 11/22/2022
10
10
ms.author: cshoe
11
11
---
12
12
13
-
# Build an Azure Static Web Apps website with Blazor
13
+
# Build an Azure Static Web Apps website with Blazor and serverless API
14
14
15
15
Azure Static Web Apps publishes a website to a production environment by building apps from a GitHub repository, which is supported by a serverless backend. The following tutorial shows how to deploy C# Blazor WebAssembly app that displays weather data returned by a serverless API.
16
+
16
17
## Prerequisites
17
18
18
19
-[GitHub](https://github.com) account
@@ -60,7 +61,7 @@ Now that the repository is created, create a static web app from the Azure porta
| API location |**Api**| Folder containing the Azure Functions app |
64
+
| API location |**ApiIsolated**| Folder containing the .NET 7 Azure Functions app |
64
65
| Output location |**wwwroot**| Folder in the build output containing the published Blazor WebAssembly application |
65
66
66
67
8. Select **Review + Create** to verify the details are all correct.
@@ -88,13 +89,15 @@ The Static Web Apps overview window displays a series of links that help you int
88
89
2. Once GitHub Actions workflow is complete, you can select the _URL_ link to open the website in new tab.
89
90
90
91
:::image type="content" source="media/deploy-blazor/my-first-static-blazor-app.png" alt-text="Screenshot of Static Web Apps Blazor webpage.":::
92
+
91
93
## 4. Understand the application overview
92
94
93
95
Together, the following projects make up the parts required to create a Blazor WebAssembly application running in the browser supported by an Azure Functions API backend.
94
96
95
97
|Visual Studio project |Description |
96
98
|---------|---------|
97
-
|API | The C# Azure Functions application implements the API endpoint that provides weather information to the Blazor WebAssembly app. The **WeatherForecastFunction** returns an array of `WeatherForecast` objects. |
99
+
|Api | The *.NET 6 in-process* C# Azure Functions application implements the API endpoint that provides weather information to the Blazor WebAssembly app. The **WeatherForecastFunction** returns an array of `WeatherForecast` objects. |
100
+
|ApiIsolated | The *.NET 7 isolated-process* C# Azure Functions application implements the API endpoint that provides weather information to the Blazor WebAssembly app. The **WeatherForecastFunction** returns an array of `WeatherForecast` objects. |
98
101
|Client |The front-end Blazor WebAssembly project. A [fallback route](#fallback-route) is implemented to ensure client-side routing is functional. |
99
102
|Shared | Holds common classes referenced by both the Api and Client projects, which allow data to flow from API endpoint to the front-end web app. The [`WeatherForecast`](https://github.com/staticwebdev/blazor-starter/blob/main/Shared/WeatherForecast.cs) class is shared among both apps. |
100
103
@@ -113,7 +116,7 @@ The app exposes URLs like `/counter` and `/fetchdata`, which map to specific rou
113
116
}
114
117
```
115
118
116
-
The json configuration ensures that requests to any route in the app return the `index.html` page.
119
+
The JSON configuration ensures that requests to any route in the app return the `index.html` page.
0 commit comments