Fork me on GitHub

Hi guys, first time on clojurians slack - bit of a beginner. I'm setting up a rethinkdb deployment and I want to use to connect to it, but don't know which connection parameters I should be using


Probably host and auth-key


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 rethinkdb instance. The auth-key is the admin password taken from authentication credential provided by 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]>