|
|
@ -387,14 +387,14 @@ 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?replicaSet=rs1&tls=false" |
|
|
|
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" |
|
|
|
//MongoClient.connect(mongourl, options).then((client) => {
|
|
|
|
MongoClient.connect(mongourl).then((client) => { |
|
|
|
const db = client.db('fluent'); |
|
|
|
db.collection('log', onCollection); |
|
|
|
// do database things
|
|
|
|
}).catch((error) => { |
|
|
|
console.log("error " +JSON.stringify(error)) |
|
|
|
console.log("connect_error_mongo " +JSON.stringify(error)) |
|
|
|
// handle connection errors
|
|
|
|
}); |
|
|
|
|
|
|
|