Skip to content

Commit

Permalink
(DOCSP-32272): Atlas Top 250: Add Atlas to intro, provide Atlas-focus…
Browse files Browse the repository at this point in the history
…ed connection string (#806)

* Add Atlas to intro, provide Atlas-focused connection string

* Incorporate review feedback

* Correct errors in facet usage

(cherry picked from commit 00e5cce)
(cherry picked from commit c013393)
(cherry picked from commit fc7be53)
dacharyc authored and Chris Cho committed Sep 20, 2023
1 parent 0e4face commit ef67241
Showing 13 changed files with 92 additions and 12 deletions.
7 changes: 7 additions & 0 deletions source/compatibility.txt
Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@
Compatibility
=============

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

.. contents:: On this page
:local:
:backlinks: none
7 changes: 7 additions & 0 deletions source/fundamentals/connection.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Connection

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

.. toctree::

/fundamentals/connection/connect
34 changes: 22 additions & 12 deletions source/fundamentals/connection/connect.txt
Original file line number Diff line number Diff line change
@@ -4,14 +4,22 @@
Connection Guide
================

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

This guide shows you how to connect to a MongoDB instance or replica set
using the Node.js driver.
This guide shows you how to connect to a
`MongoDB Atlas deployment <https://www.mongodb.com/docs/atlas>`__,
a MongoDB instance, or a replica set using the Node.js driver.

Connection URI
--------------
@@ -21,25 +29,27 @@ connect to a MongoDB deployment. It instructs the driver on how it should
connect to MongoDB and how it should behave while connected. The following
example shows each part of the connection URI:

.. figure:: /includes/figures/connection-string-parts.png
.. figure:: /includes/figures/dns_seedlist_connection_string_parts.png
:alt: Each part of the connection string

In this example, we use ``mongodb`` for the protocol, which specifies
the :manual:`Standard Connection String Format </reference/connection-string/#std-label-connections-standard-connection-string-format>`.

If your instance or deployment has a DNS SRV record, you can use the
In this example, we connect to an Atlas MongoDB deployment that has a
DNS SRV record. For more details, see the
:manual:`DNS Seed List Connection Format
</reference/connection-string/#dns-seed-list-connection-format>` for
your connection string. This format offers more flexibility of
deployment and the ability to change the servers in rotation without
reconfiguring clients.
</reference/connection-string/#dns-seed-list-connection-format>`
documentation. This format offers flexibility in deployment and the
ability to change the servers in rotation without reconfiguring clients.

.. note::

To learn how to retrieve your connection string in Atlas, see the
:atlas:`Atlas driver connection guide </driver-connection>`.

The next part of the connection string contains your credentials
If you are connecting to an instance or replica set that does not have a
DNS SRV address, you must use ``mongodb`` for the protocol, which specifies
the :manual:`Standard Connection String Format
</reference/connection-string/#std-label-connections-standard-connection-string-format>`.

After the protocol, the next part of the connection string contains credentials
if you are using password-based authentication. Replace the value of ``user``
with your username and ``pass`` with your password. If you are using an
authentication mechanism that does not require a username and password, omit
7 changes: 7 additions & 0 deletions source/fundamentals/crud.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ CRUD Operations

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

.. toctree::
:caption: CRUD Operations

7 changes: 7 additions & 0 deletions source/fundamentals/crud/read-operations.txt
Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@ Read Operations

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: code example, node.js, sample dataset

- :doc:`/fundamentals/crud/read-operations/retrieve`
- :doc:`/fundamentals/crud/read-operations/cursor`
- :doc:`/fundamentals/crud/read-operations/distinct`
Binary file removed source/includes/figures/connection-string-parts.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/quick-reference.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Quick Reference

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

This page shows the driver syntax for several MongoDB commands and links to
their related reference and API documentation.

7 changes: 7 additions & 0 deletions source/quick-start.txt
Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@
Quick Start
===========

.. facet::
:name: genre
:values: tutorial

.. meta::
:keywords: node.js

.. contents:: On this page
:local:
:backlinks: none
7 changes: 7 additions & 0 deletions source/usage-examples.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Usage Examples

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: node.js

.. contents:: On this page
:local:
:backlinks: none
7 changes: 7 additions & 0 deletions source/usage-examples/find.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Find Multiple Documents

.. default-domain:: mongodb

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: code example, node.js, sample dataset

You can query for multiple documents in a collection with
``collection.find()``. The ``find()`` method uses a query document that you
provide to match the subset of the documents in the collection that match the
7 changes: 7 additions & 0 deletions source/usage-examples/findOne.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Find a Document

.. default-domain:: mongodb

.. facet::
:name: genre
:values: tutorial

.. meta::
:keywords: code example, node.js, sample dataset

You can query for a single document in a collection with the
``collection.findOne()`` method. The ``findOne()`` method uses a query
document that you provide to match only the subset of the documents in the
7 changes: 7 additions & 0 deletions source/usage-examples/insertOne.txt
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ Insert a Document

.. default-domain:: mongodb

.. facet::
:name: genre
:values: tutorial

.. meta::
:keywords: code example, node.js, sample dataset

You can insert a document into a collection using the
`collection.insertOne() <{+api+}/classes/Collection.html#insertOne>`__ method. To
insert a document, define an object that contains the fields and values that

0 comments on commit ef67241

Please sign in to comment.