Fork me on GitHub
#beginners
<
2016-06-22
>
agi_underground08:06:36

hi, i try to connect to postgres, but i get error "java.lang.Exception: Unsupported binding form: :classname" db spec is : (def db {:classname "org.postgresql.Driver" :subprotocol "postgresql" :subname "//localhost:5432/auth" :user "admin" :password "admin"}) versions: [org.postgresql/postgresql "9.4.1208.jre7"] [org.clojure/java.jdbc "0.6.1"]

plexus08:06:54

can you show how are you using db?

plexus08:06:08

for what it's worth my db-spec for postgres looks like this

plexus08:06:14

{:connection-uri "jdbc:postgresql:...db-name...?user=...&password=.."
 :subprotocol "postgresql"}

volrath17:06:48

Hello, anyone with knowledge in silk who could give me a hint here? -- I wonder where the serve/POST comes from in this example from silk's documentation Routes can be constrained by request methods.

(def api-routes
  (silk/routes {:api-data [["api"] {"limit" (silk/? (silk/int :limit) {:limit 100})
                                    "offset" (silk/? (silk/int :offset) {:offset 0})} (serve/POST)]}))


(silk/match api-routes {:path ["api"]})
;=> nil
(silk/match api-routes {:path ["api"] :request-method :post})
;=> {:limit 100, :offset 0, :domkm.silk/name :api-data, ...}

volrath18:06:08

nvm, I understood

shaun-mahood22:06:40

I'm trying to use cljc for the first time and I think I might have something wrong conceptually. I am trying to require my cljc namespace from clojurescript using the normal clojurescript :require syntax so that I can define Rum components in one place and refer to them from both the cljs and clj code (see https://github.com/tonsky/rum#server-side-rendering for reference). Is this how cljc files are meant to be referenced from clojurescript or am I way off base?

jswart22:06:02

If you want to render the components on the server, and send html to the browser then yes.