Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12788

Getting Started documentation refers to old version of Node Driver

    XMLWordPrintableJSON

Details

    Description

      Description

      I noticed that a few pages were referring to the 2.x version of the Node Driver. For example:

      var MongoClient = require('mongodb').MongoClient;
       
      var uri = "mongodb://user123:p455w0rd@gettingstarted-shard-00-00-hyjsm.mongodb.net:27017,gettingstarted-shard-00-01-hyjsm.mongodb.net:27017,gettingstarted-shard-00-02-hyjsm.mongodb.net:27017/test?ssl=true&replicaSet=GettingStarted-shard-0&authSource=admin";
      MongoClient.connect(uri, function(err, db) {
        // Paste the following examples here
       
        db.close();
      });
      

      For the 3.x version of the driver, it should look more like:

      const { MongoClient } = require('mongodb');
       
      const uri = "mongodb://user123:p455w0rd@gettingstarted-shard-00-00-hyjsm.mongodb.net:27017,gettingstarted-shard-00-01-hyjsm.mongodb.net:27017,gettingstarted-shard-00-02-hyjsm.mongodb.net:27017/test?ssl=true&replicaSet=GettingStarted-shard-0&authSource=admin";
       
      const client = new MongoClient(uri);
      client.connect().then(async function() {
        // Paste the following examples here
       
        await client.close();
      });
      

      A/C

      1. All links in getting started page (https://docs.mongodb.com/manual/tutorial/getting-started/), should point to 3.x version of that link
      2. In https://docs.mongodb.com/manual/tutorial/atlas-free-tier-setup/#connect-to-the-cluster > Node tab > Connect to Cluster > code should be for 3.x version of the driver as stated above

       Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 22 weeks ago