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: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,16 +69,16 @@ In this branch the backend REST API service is modified so that the to-do list c
69
69
70
70
Make sure you have [Node](https://nodejs.org/en/download/) as it is required by Azure Functions Core Tools and also by Azure Static Web Apps. The backend API will be using .NET Core, but Node is needed to have the local development experience running nicely.
71
71
72
-
Also install the [Azure Function Core Tools v3](https://www.npmjs.com/package/azure-functions-core-tools):
72
+
Also install the [Azure Function Core Tools v4](https://www.npmjs.com/package/azure-functions-core-tools):
73
73
74
74
```sh
75
-
npm i -g azure-functions-core-tools@3 --unsafe-perm true
75
+
npm i -g azure-functions-core-tools@4 --unsafe-perm true
76
76
```
77
77
78
78
Also install the [Azure Static Web Apps CLI](https://github.com/azure/static-web-apps-cli):
79
79
80
80
```sh
81
-
npm install -g @azure/static-web-apps-cli`
81
+
npm install -g @azure/static-web-apps-cli
82
82
```
83
83
84
84
## Create the Azure SQL database
@@ -96,7 +96,7 @@ Create a new Azure SQL database:
96
96
az sql db create -g <resource-group> -s <server-name> -n todo_v2 --service-objective GP_Gen5_2
97
97
```
98
98
99
-
Another option is to run the `azure-create-sql-db.sh` script in the `./databases` folder. The script uses the ARM template available in the same folder to create a server and a `todo_vw` database.
99
+
Another option is to run the `azure-create-sql-db.sh` script in the `./databases` folder. The script uses the ARM template available in the same folder to create a server and a `todo_v2` database.
100
100
101
101
Make sure you have the firewall configured to allow your machine to access Azure SQL:
102
102
@@ -157,7 +157,7 @@ Database has been deployed successfully!
157
157
158
158
Before starting the solution locally, you have to configure the Azure Function that is used to provide the backed API. In the `./api` folder create a `local.settings.json` file starting from the provided template. All you have to do is update the connection string with the value correct for you solution. If have created the Azure SQL database as described above you'll have a database named `todo_v2`. Just make sure you add the correct server name in the `local.settings.json`. The database name, user login and password are already set in the template file to match those used in this repository and in the `./database/sql/01-create-objects.sql` file.
159
159
160
-
To run Azure Functions locally, you also need a local Azure Storage emulator. You can use [Azurite](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio) that also has a VS Code extension.
160
+
To run Azure Functions locally, you might also need a local Azure Storage emulator. You can use [Azurite](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio) that also has a VS Code extension.
161
161
162
162
Make sure Azurite is running and then start the Azure Static Web App emulator:
163
163
@@ -183,6 +183,10 @@ The first time the script will run will create an empty `.env` file in the sampl
183
183
184
184
The GitHub Token is needed as Azure Static Web App will create a GitHub action in your repository in order to automate deployment of the solution to Azure. That is right: every time you'll push a code change to your code main code branch, the application will also be re-built and deployed in Azure.
185
185
186
+
Make sure you set the variable `gitSource` to the address of your forked repository.
187
+
188
+
If you are using the `.env` file you created in `v1.0`, make sure to add the connection string to Azure SQL by creating and setting the `azureSQL` variable. You can use the same connection string you used in the `./api/local.setting.json` file to test the solution locally.
189
+
186
190
Run the `./azure-deploy.sh` script and the Azure Static Web app will be deployed in specified resource group. You can run the script using [WSL](https://docs.microsoft.com/en-us/windows/wsl/), or Linux or [Azure Cloud Shell](https://azure.microsoft.com/en-us/features/cloud-shell/).
187
191
188
192
### Adding the database to the CI/CD pipeline
@@ -201,7 +205,7 @@ Then you have to add the following code, just before the `Build And Deploy` step
0 commit comments