Skip to content

Commit fb042b9

Browse files
rustagirmongoKart
authored andcommitted
DOCSP-32718: stableapi basic UE code comments (mongodb#760)
* DOCSP-32718: stableapi basic UE code comments * fixes
1 parent 6be0a48 commit fb042b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
// Stable API - no options
2+
13
// begin serverApiVersion
24
const { MongoClient, ServerApiVersion } = require("mongodb");
35

6+
// Replace the placeholders in the connection string uri with your credentials
47
const uri = "mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority";
5-
const client = new MongoClient(uri, { serverApi: ServerApiVersion.v1 });
6-
// end serverApiVersion
78

9+
// Create a client with options to specify Stable API Version 1
10+
const client = new MongoClient(uri, { serverApi: ServerApiVersion.v1 });
11+
// end serverApiVersion

0 commit comments

Comments
 (0)