Skip to content

Commit 3a882bc

Browse files
committed
minor updates
1 parent af9defa commit 3a882bc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/cosmos-db/create-mongodb-go.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: 'Quickstart: Connect a Go MongoDB app to Azure Cosmos DB'
3-
description: This quickstart demonstrates how to connect an existing MongoDB app written in Go to Azure Cosmos DB.
2+
title: 'Quickstart: Connect a Go application to Azure Cosmos DB's API for MongoDB'
3+
description: This quickstart demonstrates how to connect an existing Go application to Azure Cosmos DB's API for MongoDB.
44
author: abhishekgupta
55
ms.author: abhishgu
66
ms.service: cosmos-db
77
ms.subservice: cosmosdb-mongo
88
ms.devlang: go
99
ms.topic: quickstart
10-
ms.date: 05/21/2019
10+
ms.date: 04/24/2020
1111

1212
---
13-
# Quickstart: Migrate an existing MongoDB Go app to Azure Cosmos DB
13+
# Quickstart: Connect a Go application to Azure Cosmos DB's API for MongoDB
1414

1515
> [!div class="op_single_selector"]
1616
> * [.NET](create-mongodb-dotnet.md)
@@ -21,7 +21,7 @@ ms.date: 05/21/2019
2121
> * [Golang](create-mongodb-golang.md)
2222
>
2323
24-
Azure Cosmos DB is a multi-model database service that lets you quickly create and query document, table, key-value, and graph databases with global distribution and horizontal scale capabilities. In this quickstart, you create and manage an Azure Cosmos DB for Mongo DB API account by using the Azure Cloud Shell, clone an existing sample application from GitHub and configure it to work with Azure Cosmos DB.
24+
Azure Cosmos DB is a multi-model database service that lets you quickly create and query document, table, key-value, and graph databases with global distribution and horizontal scale capabilities. In this quickstart, you create and manage an Azure Cosmos DB account by using the Azure Cloud Shell, clone an existing sample application from GitHub and configure it to work with Azure Cosmos DB.
2525

2626
The sample application is a command-line based `todo` management tool written in Go. Azure Cosmos DB's API for MongoDB is [compatible with the MongoDB wire protocol](https://docs.microsoft.com/azure/cosmos-db/mongodb-introduction#wire-protocol-compatibility), making it possible for any MongoDB client driver to connect to it. This application uses the [Go driver for MongoDB](https://github.com/mongodb/mongo-go-driver) in a way that is transparent to the application that the data is stored in an Azure Cosmos DB database.
2727

@@ -70,7 +70,7 @@ The following snippets are all taken from the `todo.go` file.
7070
7171
### Connecting the Go app to Cosmos DB
7272
73-
[`clientOptions`](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo/options?tab=doc#ClientOptions) encapsulates the connection string for the Azure Cosmos DB MongoDB API, which is passed in using an environment variable (details in the upcoming section). The connection is initialized using [`mongo.NewClient`](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo?tab=doc#NewClient) to which the `clientOptions` instance is passed. [`Ping` function](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo?tab=doc#Client.Ping) is invoked to confirm successful connectivity (it is a fail-fast strategy)
73+
[`clientOptions`](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo/options?tab=doc#ClientOptions) encapsulates the connection string for Azure Cosmos DB, which is passed in using an environment variable (details in the upcoming section). The connection is initialized using [`mongo.NewClient`](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo?tab=doc#NewClient) to which the `clientOptions` instance is passed. [`Ping` function](https://pkg.go.dev/go.mongodb.org/[email protected]/mongo?tab=doc#Client.Ping) is invoked to confirm successful connectivity (it is a fail-fast strategy)
7474
7575
```go
7676
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
@@ -229,7 +229,7 @@ To confirm that the application was built properly.
229229
./todo --help
230230
```
231231
232-
## Setup Azure Cosmos DB with MongoDB API support
232+
## Setup Azure Cosmos DB
233233
234234
### Sign in to Azure
235235

0 commit comments

Comments
 (0)