Skip to content

Commit 55005b4

Browse files
committed
formatting
1 parent 2a4b6b7 commit 55005b4

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

source/integrations/mongoose-get-started.txt

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ you to alter and update databases in the future, there aren't rigid schemas.
2828
However, Mongoose enforces a semi-rigid schema from the beginning, so
2929
you must define a schema and model.
3030

31-
In this tutorial, you will perform the following actions:
32-
33-
- Set up your environment to use Mongoose
34-
- Connect to MongoDB
35-
- Create a Mongoose schema and model
36-
- Insert, update, find, and delete data
37-
- Project document fields
38-
- Validate your data
39-
- Use multiple schemas and middleware
40-
4131
Schemas
4232
~~~~~~~
4333

@@ -145,8 +135,21 @@ For more information, see the `Model.where()
145135
<https://mongoosejs.com/docs/api/model.html#Model.$where()>`__ section of the
146136
Mongoose API documentation.
147137

138+
Tutorial
139+
--------
140+
141+
In this tutorial, you will perform the following actions:
142+
143+
- Set up your environment to use Mongoose
144+
- Connect to MongoDB
145+
- Create a Mongoose schema and model
146+
- Insert, update, find, and delete data
147+
- Project document fields
148+
- Validate your data
149+
- Use multiple schemas and middleware
150+
148151
Prerequisites
149-
-------------
152+
~~~~~~~~~~~~~
150153

151154
Before you begin this tutorial, perform the following actions:
152155

@@ -185,7 +188,7 @@ Before you begin this tutorial, perform the following actions:
185188
"type": "module",
186189
...
187190

188-
.. step:: Connect to MongoDB
191+
.. step:: Connect to MongoDB.
189192

190193
In the root level of your project, create a file named ``index.js`` and
191194
add the following code to the top of the file:
@@ -201,7 +204,7 @@ Before you begin this tutorial, perform the following actions:
201204
string, see the :atlas:`Connect to Your Cluster
202205
</tutorial/connect-to-your-cluster>` tutorial in the Atlas documentation.
203206

204-
.. step:: Create a Schema and Model
207+
.. step:: Create a schema and a model.
205208

206209
Before you start adding and updating data in MongoDB, you must create a
207210
schema and model.
@@ -215,7 +218,7 @@ Before you begin this tutorial, perform the following actions:
215218
:language: javascript
216219
:dedent:
217220

218-
.. step:: Perform CRUD Operations
221+
.. step:: Perform CRUD operations.
219222

220223
You now have your first model and schema set up, and you can start
221224
inserting data into the database. The following sections show you how to
@@ -422,7 +425,7 @@ Before you begin this tutorial, perform the following actions:
422425

423426
Deleted Many Blogs: { acknowledged: true, deletedCount: 4 }
424427

425-
.. step:: Validate Your Data
428+
.. step:: Validate your data.
426429

427430
The articles inserted in the previous steps do not contain the ``author``,
428431
``dates``, or ``comments`` fields, even though these fields are included
@@ -462,7 +465,7 @@ Before you begin this tutorial, perform the following actions:
462465

463466
Validators only run on the ``create()`` and ``save()`` methods.
464467

465-
.. step:: Introduce Multiple Schemas
468+
.. step:: Introduce multiple schemas.
466469

467470
Now that you have validation on your blog schema, and the ``author`` field is
468471
``required``, you must update ``index.js`` to include the ``author``. To do
@@ -593,7 +596,7 @@ Before you begin this tutorial, perform the following actions:
593596
article. Mongoose uses the MongoDB ``$lookup`` method to populate the data
594597
automatically.
595598

596-
.. step:: Add Middleware
599+
.. step:: Add middleware.
597600

598601
In Mongoose, middleware are functions that run before, or during, the
599602
execution of asynchronous functions at the schema level.

0 commit comments

Comments
 (0)