Ugh, ok. So I switched from the default luminus choice of undertow to http-kit, to get easy sente support (undertow support hasn't landed in a release of sente yet, though it is in git).
Sente works great. The problem is http-kit seems to drop sessions, see https://github.com/http-kit/http-kit/issues/378
Spent way to long debugging this already, so I want to switch to something that just works. sente supports https://github.com/http-kit/http-kit, http://immutant.org/, https://github.com/nginx-clojure/nginx-clojure, node.js, https://github.com/ztellman/aleph
http-kit is buggy, immutant has stalled out, aleph apparently has the same session dropping problem
it's possible its not a bug in http-kit, but rather a phenomenon of how all the libs are interacting, an order issue or some such, but I couldn't resolve it. Back on undertow using sente master branch.
@ramblurr Just a shot in the dark, did you try to provide the :see-other
key when doing a redirect? I recently updated my ring-core library and had to update the redirect function.
I also do stuff to the session there and it works for me. My code looks like this:
(-> (resp/redirect (or nexturl "/") :see-other)
(assoc-in [:session :user :displayname] (:displayname user)))
That said, I don't use luminus, but my own template, which uses http-kit, among other stuff.Hi All. Does anyone have an example of using luminus without HugSQL/Conman - our would I have to do all of my own database handling. cheers
Hi (again). By trial and error I found the answer so just in case anyone else is struggling
cheers
(def conn {:datasource db/db})
(j/query conn ["select * from users"])
cheers