Error: invalid schema, expected mongodb
kyooryoo opened this issue · 0 comments
kyooryoo commented
I have a sample code with the titled error when I run:
mosca -c index.js -v
The code of index.js is:
let SSL_KEY = __dirname + '/certs/key.pem';
let SSL_CERT = __dirname + '/certs/certificate.pem';
let MONGOURL = 'mongodb+srv://admin:<passsword>@mypj-oq6wk.mongodb.net/test';
module.exports = {
id: 'broker',
stats: false,
port: 8443,
logger: {
name: 'mypj',
level: 'debug'
},
secure: {
keyPath: SSL_KEY,
certPath: SSL_CERT,
},
backend: {
type: 'mongodb',
url: MONGOURL
},
persistence: {
factory: 'mongo',
url: MONGOURL
}
};
How could I fix this schema issue?