📜  MongoWriteConcernError:在副本集配置中找不到名为“多数”的写入关注模式 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:40.878000             🧑  作者: Mango

代码示例1
//just &w=majority  from connection string !
"mongoURI" : "mongodb+srv://${ user }:${ password }@cluster0.mde0j.mongodb.net/cluster0?retryWrites=true&w=majority "
//it will lok like this 
"mongoURI" : "mongodb+srv://${ user }:${ password }@cluster0.mde0j.mongodb.net/cluster0?retryWrites=true"