rethinkdb

jeremykirkham 2016-10-02T08:51:03.000187Z

Hi guys, first time on clojurians slack - bit of a beginner. I'm setting up a http://compose.io rethinkdb deployment and I want to use https://github.com/apa512/clj-rethinkdb to connect to it, but don't know which connection parameters I should be using

apa512 2016-10-02T14:46:11.000190Z

Probably host and auth-key

jeremykirkham 2016-10-02T22:06:41.000193Z

So here's my connection snippit:

`
(defn rethink-connect
  []
  (r/connect  :host     (environ.core/env :rethinkdb-host)
              :port     (environ.core/env :rethinkdb-port)
              :db       (environ.core/env :rethinkdb-db)
              :auth-key (environ.core/env :rethinkdb-auth)))

(defn record-event!
  [event collection]
  (let [r  (with-open [conn (rethink-connect)]
              (-> (r/table collection)
                  (r/insert [event])
                  (r/run conn)))]))

` But I keep getting the error:
`
clojure.lang.ExceptionInfo: Error connecting to RethinkDB database
` I'm getting the host, port, db and auth-key from my http://compose.io rethinkdb instance. The auth-key is the admin password taken from authentication credential provided by http://compose.io interface. Not sure what's going on. I'm also given a connection string which I was wondering if I could use instead of each parameter - looks like `` <rethinkdb://admin:[password]@aws-us-xxx-1-portal.xxx.xxxx.com:15731>

2016-10-02T23:38:57.000196Z

Warning: there's something commercial afoot with rethinkdb https://discuss.horizon.io/t/are-rethink-and-horizon-dead-abandoned/619/7