Skip to content

Commit e54100d

Browse files
author
Christopher Harrison
committed
Updated steps for React front end
1 parent 046a100 commit e54100d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

articles/static-web-apps/add-mongoose.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.date: 01/25/2021
1010

1111
# Tutorial: Access data in Cosmos DB using Mongoose with Azure Static Web Apps
1212

13-
[Mongoose](https://mongoosejs.com/) is the most popular ODM (Object Document Mapping) client for Node.js. Allowing you to design a data structure and enforce validation, Mongoose provides all the tooling necessary to interact with databases that support the Mongoose API. [Cosmos DB](../cosmos-db/mongodb-introduction.md) supports the necessary Mongoose APIs and is available as a back-end server option on Azure.
13+
[Mongoose](https://mongoosejs.com/) is the most popular ODM (Object Document Mapping) client for Node.js. Allowing you to design a data structure and enforce validation, Mongoose provides all the tooling necessary to interact with databases that support the MongoDB API. [Cosmos DB](../cosmos-db/mongodb-introduction.md) supports the necessary MongoDB APIs and is available as a back-end server option on Azure.
1414

1515
In this tutorial, you learn how to:
1616

@@ -76,10 +76,10 @@ This tutorial uses a GitHub template repository to help you create your applicat
7676
- Organization: Your GitHub account name
7777
- Repository: **aswa-mongoose-tutorial**
7878
- Branch: **main**
79-
- Build presets: Choose **Custom**
80-
- App location: **/public**
79+
- Build presets: Choose **React**
80+
- App location: **/**
8181
- Api location: **api**
82-
- Output location: *leave blank*
82+
- Output location: **build**
8383
:::image type="content" source="media/add-mongoose/azure-static-web-apps.png" alt-text="Completed Azure Static Web Apps form":::
8484
11. Click **Review and create**
8585
12. Click **Create**
@@ -99,10 +99,13 @@ In order to allow the web app to communicate with the database, the database con
9999
8. Click **aswa-mongoose-tutorial** to return to the website instance
100100
9. Under **Settings** click **Configuration**
101101
10. Click **Add** and create a new Application Setting with the following values
102-
- Name: **CONNECTION_STRING**
103-
- Value: Paste the connection string you copied earlier
102+
- Name: **AZURE_COSMOS_CONNECTION_STRING**
103+
- Value: \<Paste the connection string you copied earlier\>
104104
11. Click **OK**
105-
12. Click **Save**
105+
12. Click **Add** and create a new Application Setting with the following values for name of the database
106+
- Name: **AZURE_COSMOS_DATABASE_NAME**
107+
- Value: **todo**
108+
13. Click **Save**
106109

107110
## Navigate to your site
108111

@@ -113,9 +116,10 @@ You can now explore the static web app.
113116
1. It will look similar to `https://calm-pond-05fcdb.azurestaticapps.net`
114117
1. Click **Please login to see your list of tasks**
115118
1. Click **Grant consent** to access the application
116-
1. Create a new task by typing in a title and clicking **Add task**
119+
1. Create a new lists by typing a name into the textbox labeled **create new list** and selecting **Save**
120+
1. Create a new task by typing in a title in the textbox labled **create new item** and selecting **Save**
117121
1. Confirm the task is displayed (it may take a moment)
118-
1. Mark the task as complete by **clicking the checkbox**
122+
1. Mark the task as complete by **selecting the check**; the task will be moved to the **Done items** section of the page
119123
1. **Refresh the page** to confirm a database is being used
120124

121125
## Clean up resources

0 commit comments

Comments
 (0)