I am trying to connect to a hosted rethinkDB server on compose.io using thinky.io
According to the docs I can connect with the following using 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);
})
})
});
However when using thinky.io it will not take an SSL certificate, and I would connect using the following which does not work:
const thinky = require('thinky')({
authKey: 'MY_KEY',
host: 'aws-us-east-1-portal.5.dblayer.com',
port: 11190,
});
Is there any way I can connect to compose using thinky.io or connect using r.connect()
and then use that existing connection with thinky.io?
My node.js server is hosted on heroku.
Thanks