Skip to content

Commit 93e6e77

Browse files
DOCSP-16447 localhost connection (#189)
* added localhost information
1 parent 2082f69 commit 93e6e77

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
@@ -59,6 +59,11 @@ connect to MongoDB.
5959
.. literalinclude:: /code-snippets/connection/srv.js
6060
:language: javascript
6161

62+
Connect to ``localhost``
63+
++++++++++++++++++++++++
64+
65+
.. include:: /includes/localhost-connection.rst
66+
6267
------------------------
6368
Connect to a Replica Set
6469
------------------------
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
@@ -212,6 +212,11 @@ After completing this step, you should have a working application that uses
212212
the Node.js driver to connect to your MongoDB instance, run a query on the
213213
sample data, and prints out the result.
214214

215+
Connect to ``localhost``
216+
------------------------
217+
218+
.. include:: /includes/localhost-connection.rst
219+
215220
Next Steps
216221
----------
217222

0 commit comments

Comments
 (0)