Fork me on GitHub
#luminus
<
2020-08-13
>
Casey10:08:54

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).

Casey10:08:02

Sente works great. The problem is http-kit seems to drop sessions, see https://github.com/http-kit/http-kit/issues/378

Casey10:08:30

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

Casey10:08:31

http-kit is buggy, immutant has stalled out, aleph apparently has the same session dropping problem

Casey12:08:09

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.

sveri16:08:25

@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.

Dave Simmons17:08:24

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

Dave Simmons19:08:52

Hi (again). By trial and error I found the answer so just in case anyone else is struggling

👍 3
Dave Simmons19:08:24

(def conn {:datasource db/db})

Dave Simmons19:08:37

(j/query conn ["select * from users"])