【发布时间】:2019-01-30 23:05:15
【问题描述】:
我已在 Mongo Atlas 上从 0.0.0.0/0 的任何位置启用连接。 在撇号代码中,在文件 data/local.js 中 我添加了以下代码:
module.exports = {
modules: {
'apostrophe-db': {
uri: 'mongodb+srv://clustername.mongodb.net/dbname?retryWrites=true'
}
}
};
我看到以下日志:
/home/radhika/code/demo/demo-io/node_modules/apostrophe/index.js:67
throw err;
^
MongoError: not authorized on admin to execute command { listIndexes: "aposCache", cursor: { } }
at Function.MongoError.create (/home/radhika/code/demo/demo-io/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/radhika/code/demo/demo-io/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/radhika/code/demo/demo-io/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
我在这里错过了什么?
【问题讨论】:
标签: javascript mongodb apostrophe-cms