Skip to content

Commit 0eb75f2

Browse files
committed
more small edits
1 parent 3f9bd76 commit 0eb75f2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source/connect/connection-targets.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ connection string:
7878
:dedent:
7979

8080
You can also specify your host as ``localhost``. The following code example
81-
connects to ``localhost`` on port ``27017``:
81+
connects to ``localhost`` on the default port, ``27017``:
8282

8383
.. literalinclude:: /includes/connect/connection-targets.rb
8484
:language: ruby
@@ -127,4 +127,4 @@ API Documentation
127127
-----------------
128128

129129
To learn more about creating a ``Mongo::Client`` object with the {+driver-short+},
130-
see the API documentation for `Mongo::Client. <{+api-root+}/Mongo/Client.html>`__.
130+
see the API documentation for `Mongo::Client <{+api-root+}/Mongo/Client.html>`__.

source/includes/connect/connection-targets.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'mongo'
33

44
# Replace the placeholders with your credentials
5-
uri = "mongodb+srv://lindsey:[email protected]/?retryWrites=true&w=majority&appName=AtlasCluster"
5+
uri = "<connection string>"
66

77
# Set the server_api field of the options object to Stable API version 1
88
options = { server_api: { version: "1" } }
@@ -37,13 +37,13 @@
3737
# end-replica-set
3838

3939
# start-replica-set-uri
40-
Mongo::Client.new("mongodb://127.0.0.1:27017,127.0.0.1:27018/mydb")
40+
Mongo::Client.new("mongodb://host1:27017,host2:27018,host3:27019/mydb")
4141
# end-replica-set-uri
4242

4343
# start-replica-set-option
44-
Mongo::Client.new([ '127.0.0.1:27017', '127.0.0.1:27018' ],
44+
Mongo::Client.new([ 'host1:27017', 'host2:27018', 'host3:27019' ],
4545
database: 'mydb', replica_set: 'myapp')
4646

4747
# Or using the URI syntax:
48-
Mongo::Client.new("mongodb://host1:27017,host2:27018, host3:27019/mydb?replicaSet=myapp")
48+
Mongo::Client.new("mongodb://host1:27017,host2:27018,host3:27019/mydb?replicaSet=myapp")
4949
# end-replica-set-option

0 commit comments

Comments
 (0)