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/azure-fluid-relay/how-tos/deploy-fluid-static-web-apps.md
+70-29Lines changed: 70 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@ title: 'How to: Deploy Fluid applications using Azure Static Web Apps'
3
3
description: Detailed explanation about how Fluid applications can be hosted on Azure Static Web Apps
4
4
author: sonalivdeshpande
5
5
ms.author: sdeshpande
6
-
ms.date: 08/19/2021
6
+
ms.date: 07/18/2022
7
7
ms.topic: article
8
8
ms.service: azure-fluid
9
9
---
10
10
11
11
# How to: Deploy Fluid applications using Azure Static Web Apps
12
12
13
-
This article demonstrates how to deploy Fluid apps using Azure Static Web Apps. The [FluidHelloWorld](https://github.com/microsoft/FluidHelloWorld/tree/main-azure) repository contains a Fluid application called **DiceRoller** that enables all connected clients to roll a dice and view the result. In this how-to, you deploy the DiceRoller application to Azure Static Web Apps using the Visual Studio Code extension.
13
+
This article demonstrates how to deploy Fluid apps using Azure Static Web Apps. The [FluidHelloWorld](https://github.com/microsoft/FluidHelloWorld/tree/main-azure) repository contains a Fluid application called **DiceRoller** that enables all connected clients to roll a die and view the result. In this how-to, you deploy the DiceRoller application to Azure Static Web Apps using the Visual Studio Code extension.
14
14
15
15
If you don't have an Azure subscription, [create a free trial account](https://azure.microsoft.com/free).
16
16
@@ -55,7 +55,7 @@ In order to use this token provider, you need to deploy an HTTPS endpoint that w
55
55
56
56
### Deploying an Azure Function using Azure Static Web apps
57
57
58
-
Azure Static Web Apps allow you to develop a full-stack web site without needing to deal with the server-side configuration of an entire web hosting environment. You can deploy Azure Functions alongside your static website. Using this capability, you can deploy an HTTP-triggered Azure Function that will sign tokens.
58
+
Azure Static Web Apps allows you to develop a full-stack web site without needing to deal with the server-side configuration of an entire web hosting environment. You can deploy Azure Functions alongside your static website. Using this capability, you can deploy an HTTP-triggered Azure Function that will sign tokens.
59
59
60
60
For more information about deploying Azure Function-powered APIs to your static web app see [Add an API to Azure Static Web Apps with Azure Functions](../../static-web-apps/add-api.md).
61
61
@@ -89,57 +89,98 @@ Run the `npm run build` command from the root directory to rebuild the app. This
89
89
90
90
1. Inside Visual Studio Code, select the Azure logo in the Activity Bar to open the Azure extensions window.
91
91
92
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-azure-logo.png" alt-text="An image of the Azure Logo on a white background.":::
92
+
:::image type="content" source="../images/extension-azure-logo.png" alt-text="An image of the Azure Logo on a white background.":::
93
93
94
94
> [!NOTE]
95
95
> You must sign in to Azure and GitHub in Visual Studio Code to continue. If you are not already authenticated, the extension will prompt you to sign in to both services during the creation process.
96
96
97
-
1.Under the *Static Web Apps* label, select the **plus sign**.
97
+
1.Select <kbd>F1</kbd> to open the Visual Studio Code command palette.
98
98
99
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-create-button.png" alt-text="An image of the Static Web Apps extension UI, highlighting the create button.":::
100
-
101
-
> [!NOTE]
102
-
> The Azure Static Web Apps Visual Studio Code extension streamlines the creating process by using a series of default values. If you want to have fine-grained control of the creation process, open the command palate and select **Azure Static Web Apps: Create Static Web App... (Advanced)**.
99
+
1. Enter **Create static web app** in the command box.
103
100
104
-
1.The command palette opens at the top of the editor and prompts you to select a subscription name.
101
+
1.Select *Azure Static Web Apps: Create static web app...*and select **Enter**.
105
102
106
-
Select your subscription and press <kbd>Enter</kbd>.
103
+
# [No Framework](#tab/vanilla-javascript)
107
104
108
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-subscription.png" alt-text="An image of the Azure subscription selection UI, which shows a single subscription to be selected.":::
105
+
| Setting | Value |
106
+
| --- | --- |
107
+
| Name | Enter **my-first-static-web-app**|
108
+
| Region | Select the region closest to you. |
109
+
| Build preset | Select **Custom**. |
109
110
110
-
1. Next, name your application.
111
+
# [Angular](#tab/angular)
111
112
112
-
Type **my-first-static-web-app** and press <kbd>Enter</kbd>.
113
+
| Setting | Value |
114
+
| --- | --- |
115
+
| Name | Enter **my-first-static-web-app**|
116
+
| Region | Select the region closest to you. |
117
+
| Build preset | Select **Custom**. |
113
118
114
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-create-app.png" alt-text="An image of the Static Web Apps extension UI, which shows a text box to enter the name of the application.":::
119
+
# [React](#tab/react)
115
120
116
-
1. Select a region close to you.
121
+
| Setting | Value |
122
+
| --- | --- |
123
+
| Name | Enter **my-first-static-web-app**|
124
+
| Region | Select the region closest to you. |
125
+
| Build preset | Select **Custom**. |
117
126
118
-
> [!NOTE]
119
-
> Azure Static Web Apps globally distributes your static assets. The region you select determines where your
120
-
> optional staging environments and API function app will be located.
127
+
# [Vue](#tab/vue)
128
+
129
+
| Setting | Value |
130
+
| --- | --- |
131
+
| Name | Enter **my-first-static-web-app**|
132
+
| Region | Select the region closest to you. |
133
+
| Build preset | Select **Custom**. |
134
+
135
+
---
136
+
137
+
1. Enter the settings values for that match your framework preset choice.
138
+
139
+
# [No Framework](#tab/vanilla-javascript)
140
+
141
+
| Setting | Value |
142
+
| --- | --- |
143
+
| Location of application code | Enter **/src**|
144
+
| Location of Azure Function code |**api**|
145
+
146
+
# [Angular](#tab/angular)
147
+
148
+
| Setting | Value |
149
+
| --- | --- |
150
+
| Location of application code | Enter **/**|
151
+
| Location of Azure Function code |**api**|
152
+
153
+
# [React](#tab/react)
154
+
155
+
| Setting | Value |
156
+
| --- | --- |
157
+
| Location of application code | Enter **/**|
158
+
| Location of Azure Function code |**api**|
159
+
160
+
# [Vue](#tab/vue)
161
+
162
+
| Setting | Value |
163
+
| --- | --- |
164
+
| Location of application code | Enter **/**|
165
+
| Location of Azure Function code |**api**|
121
166
122
-
1. Set other deployment options.
123
-
124
-
- When asked to select a build preset to configure default project structure, select **Custom**.
125
-
- Location of application code: `/`
126
-
- Location of Azure Function code: `api`
167
+
---
127
168
128
169
1. Once the app is created, a confirmation notification is shown in Visual Studio Code.
129
170
130
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-confirmation.png" alt-text="An image of the notification shown in Visual Studio Code when the app is created. The notification reads: Successfully created new static web app my-first-static-web-app. GitHub Actions is building and deploying your app, it will be available once the deployment completes.":::
171
+
:::image type="content" source="../images/extension-confirmation.png" alt-text="An image of the notification shown in Visual Studio Code when the app is created. The notification reads: Successfully created new static web app my-first-static-web-app. GitHub Actions is building and deploying your app, it will be available once the deployment completes.":::
131
172
132
173
As the deployment is in progress, the Visual Studio Code extension reports the build status to you.
133
174
134
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-waiting-for-deployment.png" alt-text="An image of the Static Web Apps extension UI, which shows a list of static web apps under each subscription. The highlighted static web app has a status of Waiting for Deployment displayed next to it.":::
175
+
:::image type="content" source="../images/extension-waiting-for-deployment.png" alt-text="An image of the Static Web Apps extension UI, which shows a list of static web apps under each subscription. The highlighted static web app has a status of Waiting for Deployment displayed next to it.":::
135
176
136
177
Once the deployment is complete, you can navigate directly to your website.
137
178
138
179
1. To view the website in the browser, right-click on the project in the Static Web Apps extension, and select **Browse Site**.
139
180
140
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-browse-site.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Browse Site option is highlighted.":::
181
+
:::image type="content" source="../images/extension-browse-site.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Browse Site option is highlighted.":::
141
182
142
-
1. The location of your application code, Azure Function, and build output is part of the `azure-static-web-apps-xxx-xxx-xxx.yml` workflow file located in the `/.github/workflows` directory. This file is automatically created when create the Static Web app. It defines a GitHub Actions to build and deploy your Static Web app.
183
+
2. The location of your application code, Azure Function, and build output is part of the `azure-static-web-apps-xxx-xxx-xxx.yml` workflow file located in the `/.github/workflows` directory. This file is automatically created when you create the Static Web app. It defines a GitHub Actions to build and deploy your Static Web app.
143
184
144
185
145
186
## Clean up resources
@@ -148,4 +189,4 @@ If you're not going to continue to use this application, you can delete the Azur
148
189
149
190
In the Visual Studio Code Explorer window, return to the _Static Web Apps_ section and right-click on **my-first-static-web-app** and select **Delete**.
150
191
151
-
:::image type="content" source="../../static-web-apps/media/getting-started/extension-delete.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Delete option is highlighted.":::
192
+
:::image type="content" source="../images/extension-delete.png" alt-text="An image of the menu that is shown when right-clicking on a static web app. The Delete option is highlighted.":::
0 commit comments