Question about connection url

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Trivial - P5
    • None
    • Affects Version/s: 3.0.7
    • Component/s: Docs
    • Environment:
      node
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi, quick question:

      In the "Connecting" page in the docs http://mongodb.github.io/node-mongodb-native/3.0/reference/ecmascriptnext/connecting/ , there is this line:

      const url = 'mongodb://localhost:27017/myproject';

      {{}}

      What's the purpose of /myproject?

      Because in the following lines, the dbName was provided again:

      const dbName = 'myproject';

      {{}}

      ...

      const db = client.db(dbName);

      {{}}

      which I have tried to omit (by providing /myproject in the url), but with no success.{{}}

            Assignee:
            Unassigned
            Reporter:
            Z Yin [X]
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: