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/functions-bring-your-own.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,18 @@
1
1
---
2
2
title: Bring your own functions to Azure Static Web Apps
3
3
description: Use an existing Azure Functions app with your Azure Static Web Apps site.
4
+
ms.custom: engagement-fy23
4
5
services: static-web-apps
5
6
author: craigshoemaker
6
7
ms.service: static-web-apps
7
8
ms.topic: how-to
8
-
ms.date: 07/27/2022
9
+
ms.date: 10/13/2022
9
10
ms.author: cshoe
10
11
---
11
12
12
13
# Bring your own functions to Azure Static Web Apps
13
14
14
-
Azure Static Web Apps APIs are supported by two possible configurations: managed functions and bring your own functions. See the [overview](apis-functions.md) for details between the two configurations.
15
+
Azure Static Web Apps APIs are supported by two possible configurations: managed functions and bring your own functions. For more information on the differences in configurations, see the [overview](apis-functions.md).
15
16
16
17
This article demonstrates how to link an existing Azure Functions app to an Azure Static Web Apps resource.
17
18
@@ -32,19 +33,19 @@ Once linked, you can access that same endpoint through the `api` path from your
Before you associate an existing Functions app, you first need to adjust to configuration of your static web app.
40
41
41
42
1. Set `api_location` value to an empty string (`""`) in the [workflow configuration](./build-configuration.md) file.
42
43
43
-
1. Open your Static Web Apps instance in the [Azure portal](https://portal.azure.com).
44
+
2. Open your Static Web Apps instance in the [Azure portal](https://portal.azure.com).
44
45
45
-
1. From the _Settings_ menu, select **APIs**.
46
+
3. From the _Settings_ menu, select **APIs**.
46
47
47
-
1. From the _Production_ row, select **Link** to open the *Link new Backend* window.
48
+
4. From the _Production_ row, select **Link** to open the *Link new Backend* window.
48
49
49
50
Enter the following settings.
50
51
@@ -54,12 +55,12 @@ Before you associate an existing Functions app, you first need to adjust to conf
54
55
| Subscription | Select your Azure subscription name. |
55
56
| Resource name | Select the Azure Functions app name. |
56
57
57
-
1. Select the **Link** button.
58
+
5. Select the **Link** button.
58
59
59
60
The Azure Functions app is now mapped to the `/api` route of your static web app.
60
61
61
62
> [!IMPORTANT]
62
-
> Make sure to set the `api_location` value to an empty string (`""`) in the [workflow configuration](./build-configuration.md) file before you link an existing Functions application.
63
+
> Make sure to set the `api_location` value to an empty string (`""`) in the [workflow configuration](./build-configuration.md) file before you link an existing Functions application. Also, calls assume that the external function app retains the default "api" route prefix. Many apps remove this prefix in the host.json, so make sure the prefix is in place, otherwise the call fails.
0 commit comments