Skip to content

Commit

Permalink
doc(authentication): add missing slashes between hosts and options
Browse files Browse the repository at this point in the history
Missing delimiting slash between hosts and options

mongodb/lib/url_parser.js:147:11
  • Loading branch information
eqfox authored and mbroadst committed Jan 18, 2018
1 parent a29261e commit 3712e1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference/content/tutorials/connect/authenticating.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const password = encodeURIComponent('abc123');
const authMechanism = 'DEFAULT';

// Connection URL
const url = f('mongodb://%s:%s@localhost:27017?authMechanism=%s',
const url = f('mongodb://%s:%s@localhost:27017/?authMechanism=%s',
user, password, authMechanism);

// Use connect method to connect to the Server
Expand All @@ -66,7 +66,7 @@ const f = require('util').format;
const assert = require('assert');

// Connection URL
const url = 'mongodb://dave:abc123@localhost:27017?authMechanism=SCRAM-SHA-1&authSource=myprojectdb';
const url = 'mongodb://dave:abc123@localhost:27017/?authMechanism=SCRAM-SHA-1&authSource=myprojectdb';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, client) {
assert.equal(null, err);
Expand All @@ -91,7 +91,7 @@ const f = require('util').format;
const assert = require('assert');

// Connection URL
const url = 'mongodb://dave:abc123@localhost:27017?authMechanism=MONGODB-CR&authSource=myprojectdb';
const url = 'mongodb://dave:abc123@localhost:27017/?authMechanism=MONGODB-CR&authSource=myprojectdb';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, client) {
assert.equal(null, err);
Expand Down

0 comments on commit 3712e1b

Please sign in to comment.