Skip to content

Commit 1f37523

Browse files
DOCSP-17190 connecting to localhost (#122)
* added note about connecting to localhost
1 parent ff0a9bc commit 1f37523

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

source/fundamentals/connection.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ connect to MongoDB.
9696

9797
.. _connect-replica-set:
9898

99+
Connect to ``localhost``
100+
~~~~~~~~~~~~~~~~~~~~~~~~
101+
102+
.. include:: /includes/localhost-connection.rst
103+
99104
Connect to a Replica Set
100105
------------------------
101106

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
To connect to a ``mongod`` running locally, change the connection string
2+
to ``"mongodb://localhost:<port>"``, e.g. ``"mongodb://locahost:27017"``.
3+
4+
Your ``mongod`` instance must be running to successfully connect to your
5+
database. For information on how to start your ``mongod`` instance,
6+
see the :manual:`Manage mongod Processes
7+
</tutorial/manage-mongodb-processes/#start-mongod-processes>` Server
8+
Manual Entry.

source/quick-start.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ After completing this step, you should have a working application that uses
9595
the Java driver to connect to your MongoDB cluster, run a query on the
9696
sample data, and print out the result.
9797

98+
Connect to ``localhost``
99+
~~~~~~~~~~~~~~~~~~~~~~~~
100+
101+
.. include:: /includes/localhost-connection.rst
102+
98103
Working with POJOs (Optional)
99104
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100105

0 commit comments

Comments
 (0)