June 2014
Intermediate to advanced
696 pages
38h 52m
English
Another option for connecting to MongoDB using MongoClient is to use a connection string. With this option, you use a simple connection string to create, open, and authenticate a connection to the database. The Server and MongoClient options used to connect to the database are created in the background. This method has the advantage of being very simple to implement.
To connect to MongoDB via a connection string, you need to call the connect() method on the MongoClient class; no instance is required. The connect() method uses the following syntax:
MongoClient.connect(connString, options, callback)
The connString string has the following syntax (described in Table 13.4 ...
Read now
Unlock full access