Skip to content

Commit a613de6

Browse files
Merge pull request #230829 from craigshoemaker/swa/db-connection-updates
[Static Web Apps] Database connection updates
2 parents a3166f2 + aa445e6 commit a613de6

File tree

4 files changed

+75
-7
lines changed

4 files changed

+75
-7
lines changed

articles/static-web-apps/database-azure-sql.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: craigshoemaker
55
ms.author: cshoe
66
ms.service: static-web-apps
77
ms.topic: tutorial
8-
ms.date: 03/07/2023
8+
ms.date: 03/15/2023
99
zone_pivot_groups: static-web-apps-api-protocols
1010
---
1111

@@ -106,16 +106,36 @@ The rest of this tutorial focuses on editing your static web app's source code t
106106
107107
1. Switch to the `main` branch.
108108
109+
# [Bash](#tab/bash)
110+
109111
```bash
110112
git checkout main
111113
```
112114
115+
# [PowerShell](#tab/powershell)
116+
117+
```powershell
118+
git checkout main
119+
```
120+
121+
---
122+
113123
1. Synchronize your local version with what's on GitHub by using `git pull`.
114124

125+
# [Bash](#tab/bash)
126+
115127
```bash
116128
git pull origin main
117129
```
118130

131+
# [PowerShell](#tab/powershell)
132+
133+
```powershell
134+
git pull origin main
135+
```
136+
137+
---
138+
119139
### Create the database configuration file
120140

121141
Next, create the configuration file that your static web app uses to interface with the database.

articles/static-web-apps/database-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: craigshoemaker
55
ms.author: cshoe
66
ms.service: static-web-apps
77
ms.topic: how-to
8-
ms.date: 03/07/2023
8+
ms.date: 03/15/2023
99
---
1010

1111
# Database connection configuration in Azure Static Web Apps (preview)

articles/static-web-apps/database-mysql.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: craigshoemaker
55
ms.author: cshoe
66
ms.service: static-web-apps
77
ms.topic: tutorial
8-
ms.date: 03/07/2023
8+
ms.date: 03/15/2023
99
zone_pivot_groups: static-web-apps-api-protocols
1010
---
1111

@@ -28,7 +28,7 @@ In this tutorial, you learn to:
2828
2929
## Prerequisites
3030

31-
To complete this tutorial, you need to have an existing Azure Database for MySQL database and static web app. Additionally, you need to install Azure Data Studio.
31+
To complete this tutorial, you need to have an existing Azure Database for MySQL database and static web app. Additionally, you need to install Azure Data Studio.
3232

3333
| Resource | Description |
3434
|---|---|
@@ -62,7 +62,11 @@ To use your Azure database for local development, you need to retrieve the conne
6262

6363
1. In the *Connect from your app* section, select the ADO.NET connection string and set it aside in a text editor.
6464

65-
Make sure to replace the `{your_password}` placeholder in the connection string with your password, and the `{your_database}` placeholder with the database name `MyTestPersonDatabase`. You create the `MyTestPersonDatabase` in the coming steps. Delete the *SslMode* and the *SslCa* sections of the connection string, since these require extra steps and are intended for production purposes.
65+
1. Replace the `{your_password}` placeholder in the connection string with your password.
66+
67+
1. Replace the `{your_database}` placeholder with the database name `MyTestPersonDatabase`. You'll create the `MyTestPersonDatabase` in the coming steps.
68+
69+
1. Delete the *SslMode* and the *SslCa* sections of the connection string as these require extra steps and are intended for production purposes.
6670

6771
## Create sample data
6872

@@ -105,16 +109,36 @@ The rest this tutorial focuses on editing your static web app's source code to m
105109

106110
1. Switch to the `main` branch.
107111

112+
# [Bash](#tab/bash)
113+
108114
```bash
109115
git checkout main
110116
```
111117

118+
# [PowerShell](#tab/powershell)
119+
120+
```powershell
121+
git checkout main
122+
```
123+
124+
---
125+
112126
1. Synchronize your local version with what's on GitHub by using `git pull`.
113127
128+
# [Bash](#tab/bash)
129+
114130
```bash
115131
git pull origin main
116132
```
117133
134+
# [PowerShell](#tab/powershell)
135+
136+
```powershell
137+
git pull origin main
138+
```
139+
140+
---
141+
118142
### Create the database configuration file
119143
120144
Next, create the configuration file that your static web app uses to interface with the database.

articles/static-web-apps/database-postgresql.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: craigshoemaker
55
ms.author: cshoe
66
ms.service: static-web-apps
77
ms.topic: tutorial
8-
ms.date: 03/03/2023
8+
ms.date: 03/15/2023
99
zone_pivot_groups: static-web-apps-api-protocols
1010
---
1111

@@ -62,7 +62,11 @@ To use your Azure database for local development, you need to retrieve the conne
6262

6363
1. From the *ADO.NET* box, copy the connection string and set it aside in a text editor.
6464

65-
Make sure to replace the `{your_password}` placeholder in the connection string with your password, and the `{your_database}` placeholder with the database name `MyTestPersonDatabase`, which is the name of the database you create in the following steps. Append `Trust Server Certificate=True;` to the connection string to use this connection string for local development.
65+
1. Replace the `{your_password}` placeholder in the connection string with your password.
66+
67+
1. Replace the `{your_database}` placeholder with the database name `MyTestPersonDatabase`. You'll create the `MyTestPersonDatabase` in the coming steps.
68+
69+
1. Append `Trust Server Certificate=True;` to the connection string to use this connection string for local development.
6670

6771
## Create sample data
6872

@@ -106,16 +110,36 @@ The rest this tutorial focuses on editing your static web app's source code to m
106110
107111
1. Switch to the `main` branch.
108112
113+
# [Bash](#tab/bash)
114+
109115
```bash
110116
git checkout main
111117
```
112118
119+
# [PowerShell](#tab/powershell)
120+
121+
```powershell
122+
git checkout main
123+
```
124+
125+
---
126+
113127
1. Synchronize your local version with what's on GitHub by using `git pull`.
114128

129+
# [Bash](#tab/bash)
130+
115131
```bash
116132
git pull origin main
117133
```
118134

135+
# [PowerShell](#tab/powershell)
136+
137+
```powershell
138+
git pull origin main
139+
```
140+
141+
---
142+
119143
### Create the database configuration file
120144

121145
Next, create the configuration file that your static web app uses to interface with the database.

0 commit comments

Comments
 (0)