|
2 | 2 |
|
3 | 3 | The official [MongoDB](https://www.mongodb.com/) driver for Node.js. |
4 | 4 |
|
5 | | -**NOTE: v4.x was recently released with breaking API changes. You can find a list of changes [here](https://github.com/mongodb/node-mongodb-native/blob/4.0/HISTORY.md).** |
| 5 | +**Upgrading to version 4? Take a look at our [upgrade guide here](https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md)!** |
6 | 6 |
|
7 | 7 | ## Quick Links |
8 | 8 |
|
9 | | -| what | where | |
10 | | -|---------------|------------------------------------------------------------------------------------------------------------------| |
11 | | -| documentation | [https://docs.mongodb.com/drivers/node](https://docs.mongodb.com/drivers/node) | |
12 | | -| api-doc | [https://mongodb.github.io/node-mongodb-native/4.0/](https://mongodb.github.io/node-mongodb-native/4.0/) | |
13 | | -| npm package | [https://www.npmjs.com/package/mongodb](https://www.npmjs.com/package/mongodb) | |
14 | | -| source | [https://github.com/mongodb/node-mongodb-native](https://github.com/mongodb/node-mongodb-native) | |
15 | | -| mongodb | [https://www.mongodb.com](https://www.mongodb.com) | |
| 9 | +| what | where | |
| 10 | +| ------------- | ------------------------------------------------------------------------------------------------------ | |
| 11 | +| documentation | [docs.mongodb.com/drivers/node](https://docs.mongodb.com/drivers/node) | |
| 12 | +| api-doc | [mongodb.github.io/node-mongodb-native/4.0/](https://mongodb.github.io/node-mongodb-native/4.0/) | |
| 13 | +| npm package | [www.npmjs.com/package/mongodb](https://www.npmjs.com/package/mongodb) | |
| 14 | +| source | [github.com/mongodb/node-mongodb-native](https://github.com/mongodb/node-mongodb-native) | |
| 15 | +| mongodb | [www.mongodb.com](https://www.mongodb.com) | |
| 16 | +| changelog | [HISTORY.md](https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/HISTORY.md) | |
| 17 | +| upgrade to v4 | [docs/CHANGES_4.0.0.md](https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md) | |
16 | 18 |
|
17 | 19 | ### Bugs / Feature Requests |
18 | 20 |
|
@@ -103,7 +105,7 @@ For complete MongoDB installation instructions, see [the manual](https://docs.mo |
103 | 105 |
|
104 | 106 | 1. Download the right MongoDB version from [MongoDB](https://www.mongodb.org/downloads) |
105 | 107 | 2. Create a database directory (in this case under **/data**). |
106 | | -3. Install and start a ``mongod`` process. |
| 108 | +3. Install and start a `mongod` process. |
107 | 109 |
|
108 | 110 | ```bash |
109 | 111 | mongod --dbpath=/data |
@@ -194,7 +196,7 @@ const filteredDocs = await collection.find({ a: 3 }).toArray() |
194 | 196 | console.log('Found documents filtered by { a: 3 } =>', filteredDocs) |
195 | 197 | ``` |
196 | 198 |
|
197 | | -Only the documents which match ``'a' : 3`` should be returned. |
| 199 | +Only the documents which match `'a' : 3` should be returned. |
198 | 200 |
|
199 | 201 | ### Update a document |
200 | 202 |
|
@@ -223,7 +225,7 @@ performance. The following function creates an index on the **a** field in the |
223 | 225 | **documents** collection. |
224 | 226 |
|
225 | 227 | ```js |
226 | | -const indexName = await collection.createIndex({a: 1}) |
| 228 | +const indexName = await collection.createIndex({ a: 1 }) |
227 | 229 | console.log('index name =', indexName) |
228 | 230 | ``` |
229 | 231 |
|
|
0 commit comments