mongoskin connects to Ali"s mongodb database, but the data cannot be queried when querying
. connection code
var db = mongoskin.db ("mongodb://root:root_2018@dds-2zebaf8b74b085541692-pub.mongodb.rds.aliyuncs.com:3717,dds-2zebaf8b74b085542379-pub.mongodb.rds.aliyuncs.com:3717/admin?replicaSet=mgset-7977929/bobo", {safe: true});
Collection association
var collections = {
config: db.collection("config"),
players: db.collection("players"),
tips: db.collection("tips"),
tips2: db.collection("tips2"),
records: db.collection("records"),
users: db.collection("users"),
ADs: db.collection("ads"),
hardwares: db.collection("hardwares"),
trainings: db.collection("trainings"),
trainingStatus: db.collection("trainingStatus"),
dayTrainings: db.collection("dayTrainings"),
A1: db.collection("A1"),
foreignConfig: db.collection("foreignConfig"),
connectTestTime: db.collection("connectTestTime"),
test: db.collection("test"),
}
data query
req.collections.test.find({}, function (error, config) {
if (!error) {
console.log("confsssssssssssssssssssssig", error)
}
console.log("testttt****", config)
})
console.log("****1")
req.collections.config.findById("592fc0a37c3f2f4ac49808e9", function (error, config) {
if (req.useragent.isAndroid) {
for (var i = 0; i < config.toies.length; iPP) {
config.toies[i].requiredAppVersion = "1.0";
}
}
query results are all null
Ali mongodb structure
user libraries cannot be accessed, but system libraries can access
what is the reason for this, guys?