yapi mongo集群配置要这样子

dpiehjr4  于 5个月前  发布在  Go
关注(0)|答案(1)|浏览(98)

{
"port": "3000",
"db": {
"connectString": "www.mongodb://xxxx.com:27017,www.xxxx.com:27017,www.xxx.com:27017/yapi?replicaSet=replSet_yapi?slaveOk=true",
"user": "xxxx",
"pass": "xxxxxx"
},

x0fgdtte

x0fgdtte1#

哈罗,我不太明白replicaSet=replSet_yapi?slaveOk=true这一串是固定的写法?
我现在有个mongodb集群如下:

副本集名称:yapi01
IP列表:
    10.142.***.**:28005,
    10.142.***.**:28005,
    10.142.***.**:28005
authDB:***
用户名:yapi_rw
密码:********
库:yapi

我该怎么配置呢?下面是我猜想的配置:

{
  "port": "***",
  "db": {
     "connectString":"mongodb://10.142.***.**:28005,10.142.***.**:28005,10.142.***.**:28005/yapi?[authDB]=true",
     "user": "yapi_rw",
     "pass": "******"
  },
}

@cypggs 还请帮忙看下,指出错误!多谢~

相关问题