mongodb/node-mongodb-native — pull request #1220 by imaman (2014-10-23 00:25:32+00:00)
Title: Allow replicaSet name to be omitted 

The replicaSet option (of ReplSet) now defaults to server's setName, if totalNumberOfMongodServers is 1. This provides a sensible default value for trivial cases, thus simplifying the connection boilerplate.

Motivation:

I can connect to a mongo on heroku via:

mongo some_address -u UUU -p PPP --eval "db.getCollectionNames()"

But I *cannot* connect to it via mongodb 2.0.3:

require('mongodb').MongoClient.connect(
'mongodb://UUU:PPP@some_address',
function(err, db) { console.error(err); }
);

Output:
"replicaSet parameter must be set"