1
我试图连接到一个托管rethinkDB服务器上compose.io使用thinky.io连接到compose.io rethinkDB服务器thinky.io
据我可以连接文档以下使用r.connect:
const r = require('rethinkdb');
const fs = require('fs');
fs.readFile('../cacert', function(err, caCert) {
r.connect({
authKey: 'MY_KEY',
host: 'aws-us-east-1-portal.5.dblayer.com',
port: 11190,
ssl: {
ca: caCert
}
}, function(error, conn) {
r.dbList().run(conn, function(err, results) {
console.log(results);
})
})
});
但是使用thinky.io它时,不会采取SSL证书,我会使用下面的连接不工作:
const thinky = require('thinky')({
authKey: 'MY_KEY',
host: 'aws-us-east-1-portal.5.dblayer.com',
port: 11190,
});
有什么办法我可以连接使用thinky.io 或使用r.connect()
连接,然后使用具有thinky.io现有连接组成?
我的node.js服务器托管在heroku上。
感谢