Loopback MongoDB连接器问题

时间:2018-02-24 06:12:53

标签: node.js strongloop

我在Mongodb密码中使用特殊字符$。

这是我的连接器的样子

 {
"name": {
"host": "using ip here",
"port": 27017,
"url": "",
"database": "",
"password": "example123$",
"name": "name",
"user": "username",
"connector": "mongodb"
 }
}

错误  无法初始化连接器“mongodb”:密码包含非法的非转义字符

有没有办法在Loopback连接器中使用特殊字符。

2 个答案:

答案 0 :(得分:0)

  

尝试使用%24。即example123%24

%24$

的编码值

const enc = encodeURIComponent('$')
console.log('Encoded Value :', enc)

答案 1 :(得分:0)

请在环回Github上查看问题#3764。

https://github.com/strongloop/loopback/issues/3764

相关问题