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/cosmos-db/mongodb/vcore/tutorial-nodejs-web-app.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: |
3
3
Tutorial: Build a Node.js web application
4
-
titleSuffix: Azure Cosmos DB for MongoDB vCore
5
-
description: In this tutorial, create a Node.js web application that connects to an Azure Cosmos DB for MongoDB vCore cluster and manages documents within a collection.
4
+
titleSuffix: Azure Cosmos DB for MongoDB (vCore)
5
+
description: In this tutorial, create a Node.js web application that connects to a vCore cluster in Azure Cosmos DB for MongoDB and manages documents within a collection.
6
6
author: gahl-levy
7
7
ms.author: gahllevy
8
8
ms.reviewer: sidandrews
@@ -11,26 +11,26 @@ ms.subservice: mongodb-vcore
11
11
ms.topic: tutorial
12
12
ms.date: 08/28/2023
13
13
ms.custom: devx-track-js, devx-track-azurecli
14
-
# CustomerIntent: As a developer, I want to connect to Azure Cosmos DB for MongoDB vCore from my Node.js application, so I can build MERN stack applications.
14
+
# CustomerIntent: As a developer, I want to connect to Azure Cosmos DB for MongoDB (vCore) from my Node.js application, so I can build MERN stack applications.
15
15
---
16
16
17
-
# Tutorial: Connect a Node.js web app with Azure Cosmos DB for MongoDB vCore
17
+
# Tutorial: Connect a Node.js web app with Azure Cosmos DB for MongoDB (vCore)
In this tutorial, you build a Node.js web application that connects to Azure Cosmos DB for MongoDB vCore. The MongoDB, Express, React.js, Node.js (MERN) stack is a popular collection of technologies used to build many modern web applications. With Azure Cosmos DB for MongoDB vCore, you can build a new web application or migrate an existing application using MongoDB drivers that you're already familiar with. In this tutorial, you:
21
+
In this tutorial, you build a Node.js web application that connects to Azure Cosmos DB for MongoDB in vCore architecture. The MongoDB, Express, React.js, Node.js (MERN) stack is a popular collection of technologies used to build many modern web applications. With Azure Cosmos DB for MongoDB (vCore), you can build a new web application or migrate an existing application using MongoDB drivers that you're already familiar with. In this tutorial, you:
22
22
23
23
> [!div class="checklist"]
24
24
> - Set up your environment
25
25
> - Test the MERN application with a local MongoDB container
26
-
> - Test the MERN application with the Azure Cosmos DB for MongoDB vCore cluster
26
+
> - Test the MERN application with a vCore cluster
27
27
> - Deploy the MERN application to Azure App Service
28
28
29
29
## Prerequisites
30
30
31
31
To complete this tutorial, you need the following resources:
32
32
33
-
- An existing Azure Cosmos DB for MongoDB vCore cluster.
33
+
- An existing vCore cluster.
34
34
- A GitHub account.
35
35
- GitHub comes with free Codespaces hours for all users.
36
36
@@ -204,7 +204,7 @@ Start by running the sample application's API with the local MongoDB container t
204
204
205
205
| Environment Variable | Value |
206
206
| --- | --- |
207
-
|`CONNECTION_STRING`| The connection string to the Azure Cosmos DB for MongoDB vCore cluster. For now, use `mongodb://localhost:27017?directConnection=true`. |
207
+
|`CONNECTION_STRING`| The connection string to the Azure Cosmos DB for MongoDB (vCore) cluster. For now, use `mongodb://localhost:27017?directConnection=true`. |
@@ -234,15 +234,15 @@ Start by running the sample application's API with the local MongoDB container t
234
234
235
235
1. Close the terminal.
236
236
237
-
## Test the MERN application with the Azure Cosmos DB for MongoDB vCore cluster
237
+
## Test the MERN application with the Azure Cosmos DB for MongoDB (vCore) cluster
238
238
239
-
Now, let's validate that the application works seamlessly with Azure Cosmos DB for MongoDB vCore. For this task, populate the pre-existing cluster with seed data using the MongoDB shell and then update the API's connection string.
239
+
Now, let's validate that the application works seamlessly with Azure Cosmos DB for MongoDB (vCore). For this task, populate the pre-existing cluster with seed data using the MongoDB shell and then update the API's connection string.
240
240
241
241
1. Sign in to the Azure portal (<https://portal.azure.com>).
242
242
243
-
1. Navigate to the existing Azure Cosmos DB for MongoDB vCore cluster page.
243
+
1. Navigate to the existing Azure Cosmos DB for MongoDB (vCore) cluster page.
244
244
245
-
1. From the Azure Cosmos DB for MongoDB vCore cluster page, selectthe**Connection strings** navigation menu option.
245
+
1. From the Azure Cosmos DB for MongoDB (vCore) cluster page, selectthe**Connection strings** navigation menu option.
246
246
247
247
:::image type="content" source="media/tutorial-nodejs-web-app/select-connection-strings-option.png" alt-text="Screenshot of the connection strings option on the page for a cluster.":::
248
248
@@ -310,7 +310,7 @@ Now, let's validate that the application works seamlessly with Azure Cosmos DB f
310
310
311
311
| Environment Variable | Value |
312
312
| --- | --- |
313
-
| `CONNECTION_STRING` | The connection string to the Azure Cosmos DB for MongoDB vCore cluster. Use the same connection string you used with the mongo shell. |
313
+
| `CONNECTION_STRING` | The connection string to the Azure Cosmos DB for MongoDB (vCore) cluster. Use the same connection string you used with the mongo shell. |
314
314
315
315
```output
316
316
CONNECTION_STRING=<your-connection-string>
@@ -392,7 +392,7 @@ Deploy the service and client to Azure App Service to prove that the application
392
392
--output tsv)
393
393
```
394
394
395
-
1. Use the `open-cli` package and command from NuGet with `npx` to open a browser window using the URI for the server web app. Validate that the server app is returning your JSON array data from the MongoDB vCore cluster.
395
+
1. Use the `open-cli` package and command from NuGet with `npx` to open a browser window using the URI for the server web app. Validate that the server app is returning your JSON array data from the MongoDB (vCore) cluster.
396
396
397
397
```shell
398
398
npx open-cli "https://$serverUri/products" --yes
@@ -498,7 +498,7 @@ You aren't necessarily required to clean up your local environment, but you can
498
498
499
499
## Next step
500
500
501
-
Now that you have built your first application for the MongoDB vCore cluster, learn how to migrate your data to Azure Cosmos DB.
501
+
Now that you have built your first application for the MongoDB (vCore) cluster, learn how to migrate your data to Azure Cosmos DB.
0 commit comments