We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89f96cf commit 62d7152Copy full SHA for 62d7152
source/code-snippets/stable-api/basic.js
@@ -1,7 +1,11 @@
1
+// Stable API - no options
2
+
3
// begin serverApiVersion
4
const { MongoClient, ServerApiVersion } = require("mongodb");
5
6
+// Replace the placeholders in the connection string uri with your credentials
7
const uri = "mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority";
-const client = new MongoClient(uri, { serverApi: ServerApiVersion.v1 });
-// end serverApiVersion
8
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