diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 1377929..9744701 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -387,7 +387,7 @@ function onCollection(err, collection) { // db.collection('log', onCollection); //} -var mongourl = "mongodb://playgrounduser:efvvnuioervefSDFSGYGHRDFVsdfergvssppiiedifhwincvinviw_dbfjbsifbsdkjfswuunscfudfgbbfvibqefwrvnine@ondemand_playground_mongo1:27017,ondemand_playground_mongo2:27017,ondemand_playground_mongo3:27017,ondemand_playground_mongo4:27017,ondemand_playground_mongo5:27017,ondemand_playground_mongo6:27017,ondemand_playground_mongo7:27017/fluent?replicaSet=rs1" +var mongourl = "mongodb://playgrounduser:efvvnuioervefSDFSGYGHRDFVsdfergvssppiiedifhwincvinviw_dbfjbsifbsdkjfswuunscfudfgbbfvibqefwrvnine@ondemand_playground_mongo1:27017,ondemand_playground_mongo2:27017,ondemand_playground_mongo3:27017,ondemand_playground_mongo4:27017,ondemand_playground_mongo5:27017,ondemand_playground_mongo6:27017,ondemand_playground_mongo7:27017/?replicaSet=rs1" //var mongolab_uri = "mongodb://:@:,:/?replicaSet="; var mongooptions = { //server: { @@ -408,10 +408,11 @@ var mongooptions = { } */ } -MongoClient.connect(mongourl, mongooptions, function(err, db){ +MongoClient.connect(mongourl, mongooptions, function(err, client){ if(err){ console.log(err); } else { + const db = client.db('fluent'); db.collection('log', onCollection); /* db.collection(function(err, collections) {