Skip to content

Commit 5c4c73b

Browse files
committed
updating file
1 parent 04a69be commit 5c4c73b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/app-service/tutorial-nodejs-mongodb-app.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Deploy a Node.js web app using MongoDB to Azure
3-
description: This article shows you have to deploy a Node.js app using Express.js and a MongoDB database to Azure. Azure App Service is used to host the web application and Azure Cosmos DB to host the database using the 100% compatible MongoDB API built into Cosmos DB.
3+
description: This article shows you have to deploy a Node.js app using Express.js and a MongoDB database to Azure. Azure App Service is used to host the web application and Azure Cosmos DB to host the database using the 100% compatible MongoDB API built into Cosmos DB.
44
ms.topic: tutorial
55
ms.date: 03/07/2022
66
ms.service: app-service
@@ -11,7 +11,7 @@ ms.custom: scenarios:getting-started, languages:javascript, devx-track-js, devx-
1111

1212
# Deploy a Node.js + MongoDB web app to Azure
1313

14-
In this tutorial, you'll deploy a sample **Express.js** app using a **MongoDB** database to Azure. The Express.js app will be hosted in Azure App Service which supports hosting Node.js apps in both Linux (Node versions 12, 14, and 16) and Windows (versions 12 and 14) server environments. The MongoDB database will be hosted in Azure Cosmos DB, a cloud native database offering a [100% MongoDB compatible API](../cosmos-db/mongodb/mongodb-introduction.md).
14+
In this tutorial, you'll deploy a sample **Express.js** app using a **MongoDB** database to Azure. The Express.js app will be hosted in Azure App Service, which supports hosting Node.js apps in both Linux (Node versions 12, 14, and 16) and Windows (versions 12 and 14) server environments. The MongoDB database will be hosted in Azure Cosmos DB, a cloud native database offering a [100% MongoDB compatible API](../cosmos-db/mongodb/mongodb-introduction.md).
1515

1616
:::image type="content" source="./media/tutorial-nodejs-mongodb-app/app-diagram.png" alt-text="A diagram showing how the Express.js app will be deployed to Azure App Service and the MongoDB data will be hosted inside of Azure Cosmos DB." lightbox="./media/tutorial-nodejs-mongodb-app/app-diagram-large.png":::
1717

@@ -36,12 +36,12 @@ Follow these steps to run the application locally:
3636

3737
Azure App Service is used to host the Express.js web app. When setting up the App Service for the application, you'll specify:
3838

39-
* The **Name** for the web app. This name is used as part of the DNS name for your webapp in the form of `https://<app-name>.azurewebsites.net`.
40-
* The **Runtime** for the app. This is where you select the version of Node to use for your app.
39+
* The **Name** for the web app. It's the name used as part of the DNS name for your webapp in the form of `https://<app-name>.azurewebsites.net`.
40+
* The **Runtime** for the app. It's where you select the version of Node to use for your app.
4141
* The **App Service plan** which defines the compute resources (CPU, memory) available for the application.
42-
* The **Resource Group** for the app. A resource group lets you group all of the Azure resources needed for the application together in a logical container.
42+
* The **Resource Group** for the app. A resource group lets you group (in a logical container) all the Azure resources needed for the application.
4343

44-
Azure resources can be created using the [Azure portal](https://portal.azure.com/), VS Code using the [Azure Tools extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack), or the Azure CLI.
44+
Create Azure resources using the [Azure portal](https://portal.azure.com/), VS Code using the [Azure Tools extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack), or the Azure CLI.
4545

4646
### [Azure portal](#tab/azure-portal)
4747

@@ -89,7 +89,7 @@ Azure Cosmos DB is a fully managed NoSQL database for modern app development. Am
8989

9090
### [Azure portal](#tab/azure-portal)
9191

92-
You must be signed in to the [Azure portal](https://portal.azure.com/) to finish these steps to create a Cosmos DB.
92+
You must sign in to the [Azure portal](https://portal.azure.com/) to finish these steps to create a Cosmos DB.
9393

9494
| Instructions | Screenshot |
9595
|:----------------|-----------:|
@@ -118,16 +118,16 @@ You must be signed in to the [Azure portal](https://portal.azure.com/) to finish
118118

119119
## 3 - Connect your App Service to your Cosmos DB
120120

121-
To connect to your Cosmos DB database, you need to provide the connection string for the database to your application. This is done in the sample application by reading the `DATABASE_URL` environment variable. When running locally, the sample application uses the [dotenv package](https://www.npmjs.com/package/dotenv) to read the connection string value from the `.env` file.
121+
To connect to your Cosmos DB database, you need to provide the connection string for the database to your application. It's done in the sample application by reading the `DATABASE_URL` environment variable. When you locally run it, the sample application uses the [dotenv package](https://www.npmjs.com/package/dotenv) to read the connection string value from the `.env` file.
122122

123-
When running in Azure, configuration values like connection strings can be stored in the *application settings* of the App Service hosting the web app. These values are then made available to your application as environment variables during runtime. In this way, the application uses the connection string from `process.env` the same way whether being run locally or in Azure. Further, this eliminates the need to manage and deploy environment specific config files with your application.
123+
When you run in Azure, configuration values like connection strings can be stored in the *application settings* of the App Service hosting the web app. These values are then made available to your application as environment variables during runtime. In this way, the application uses the connection string from `process.env` the same way whether being run locally or in Azure. Further, it eliminates the need to manage and deploy environment specific config files with your application.
124124

125125
### [Azure portal](#tab/azure-portal)
126126

127127
| Instructions | Screenshot |
128128
|:----------------|-----------:|
129129
| [!INCLUDE [Connection string step 1](<./includes/tutorial-nodejs-mongodb-app/connection-string-azure-portal-1.md>)] | :::image type="content" source="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-1-240px.png" alt-text="A screenshot showing the location of the Cosmos DB connection string on the Cosmos DB quick start page." lightbox="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-1.png"::: |
130-
| [!INCLUDE [Connection string step 2](<./includes/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2.md>)] | :::image type="content" source="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2-240px.png" alt-text="A screenshot showing how to search for and go to the App Service where the connection string needs to store the connection string." lightbox="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2.png"::: |
130+
| [!INCLUDE [Connection string step 2](<./includes/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2.md>)] | :::image type="content" source="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2-240px.png" alt-text="A screenshot showing how to search for and go to the App Service, where the connection string needs to store the connection string." lightbox="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-2.png"::: |
131131
| [!INCLUDE [Connection string step 3](<./includes/tutorial-nodejs-mongodb-app/connection-string-azure-portal-3.md>)] | :::image type="content" source="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-3-240px.png" alt-text="A screenshot showing how to use the Application settings within an App Service." lightbox="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-3.png"::: |
132132
| [!INCLUDE [Connection string step 4](<./includes/tutorial-nodejs-mongodb-app/connection-string-azure-portal-4.md>)] | :::image type="content" source="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-4-240px.png" alt-text="A screenshot showing the dialog used to set an application setting in Azure App Service." lightbox="./media/tutorial-nodejs-mongodb-app/connection-string-azure-portal-4.png"::: |
133133

@@ -239,7 +239,7 @@ When you're finished, you can delete all the resources from Azure by deleting th
239239

240240
### [Azure portal](#tab/azure-portal)
241241

242-
Follow these steps while signed-in to the Azure portal to delete a resource group.
242+
Follow these steps while you're signed-in to the Azure portal to delete a resource group.
243243

244244
| Instructions | Screenshot |
245245
|:----------------|-----------:|

0 commit comments

Comments
 (0)