mongoose 连接云库


mongoose 连接云库

url里要包含:authSource=admin

1
2
3
4
5
6
7
8
9
// 数据库地址
mongo: {
uri: 'mongodb://root:xxx@dds-xxx.mongodb.rds.aliyuncs.com:1111,dds-xxx.mongodb.rds.aliyuncs.com:1111/dancingRoad?replicaSet=mgset-xxx&authSource=admin',
options: {
db: {
safe: true
}
}
},