You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
351 B

(ns blog.db
(:require ["pg" :refer [Client]]
[blog.env :as env]))
(defn create-client
"Create a new client for Postgres using enviroment variables."
[]
(->> (env/get-database-credentials)
(cljs.core/clj->js)
(new Client)))
(defn connect-client
"Connect a client to the database"
[client]
(. client connect))