@@ -8,17 +8,17 @@ Connection Guide
8
8
:name: genre
9
9
:values: reference
10
10
11
- .. meta::
12
- :keywords: node.js
11
+ .. meta::
12
+ :keywords: node.js, code example, connection string, local connection, Stable API, Atlas
13
13
14
14
.. contents:: On this page
15
15
:local:
16
16
:backlinks: none
17
17
:depth: 2
18
18
:class: singlecol
19
19
20
- This guide shows you how to connect to a
21
- `MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__,
20
+ This guide shows you how to connect to a
21
+ `MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__,
22
22
a MongoDB instance, or a replica set using the Node.js driver.
23
23
24
24
.. _node-connection-uri:
@@ -34,21 +34,21 @@ example shows each part of the connection URI:
34
34
.. figure:: /includes/figures/dns_seedlist_connection_string_parts.png
35
35
:alt: Each part of the connection string
36
36
37
- In this example, we connect to an Atlas MongoDB deployment that has a
38
- DNS SRV record. For more details, see the
37
+ In this example, we connect to an Atlas MongoDB deployment that has a
38
+ DNS SRV record. For more details, see the
39
39
:manual:`DNS Seed List Connection Format
40
- </reference/connection-string/#dns-seed-list-connection-format>`
41
- documentation. This format offers flexibility in deployment and the
40
+ </reference/connection-string/#dns-seed-list-connection-format>`
41
+ documentation. This format offers flexibility in deployment and the
42
42
ability to change the servers in rotation without reconfiguring clients.
43
43
44
44
.. note::
45
45
46
46
To learn how to retrieve your connection string in Atlas, see the
47
47
:atlas:`Atlas driver connection guide </driver-connection>`.
48
48
49
- If you are connecting to an instance or replica set that does not have a
50
- DNS SRV address, you must use ``mongodb`` for the protocol, which specifies
51
- the :manual:`Standard Connection String Format
49
+ If you are connecting to an instance or replica set that does not have a
50
+ DNS SRV address, you must use ``mongodb`` for the protocol, which specifies
51
+ the :manual:`Standard Connection String Format
52
52
</reference/connection-string/#std-label-connections-standard-connection-string-format>`.
53
53
54
54
After the protocol, the next part of the connection string contains credentials
@@ -73,7 +73,7 @@ Atlas Connection Example
73
73
------------------------
74
74
75
75
You must create a client to connect to a MongoDB deployment on Atlas. To create
76
- a client, construct an instance of ``MongoClient``, passing in your
76
+ a client, construct an instance of ``MongoClient``, passing in your
77
77
URI and a ``MongoClientOptions`` object.
78
78
79
79
.. tip:: Reuse Your Client
0 commit comments