diff --git a/docs/reference/content/quick-start/quick-start.md b/docs/reference/content/quick-start/quick-start.md index a4b85c0767..89c7e5adfe 100644 --- a/docs/reference/content/quick-start/quick-start.md +++ b/docs/reference/content/quick-start/quick-start.md @@ -106,9 +106,10 @@ const url = 'mongodb://localhost:27017'; // Database Name const dbName = 'myproject'; +const client = new MongoClient(url); // Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { +client.connect(url, function(err) { assert.equal(null, err); console.log("Connected successfully to server"); @@ -156,7 +157,7 @@ rather than from within a browser console, and console.log returns better format --> -This query returns all the documents in the **documents** collection. Add the **findDocument** method to the **MongoClient.connect** callback: +This query returns all the documents in the **documents** collection. Add the **findDocument** method to the **client.connect** callback: