luminus

Casey 2020-08-13T10:21:54.059300Z

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

Casey 2020-08-13T10:22:02.059700Z

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

Casey 2020-08-13T10:23:30.060400Z

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

Casey 2020-08-13T10:24:31.061100Z

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

Casey 2020-08-13T12:38:09.062300Z

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.

sveri 2020-08-13T16:44:25.064100Z

@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 Simmons 2020-08-13T17:57:24.065400Z

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 Simmons 2020-08-13T19:21:52.065900Z

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

👍 1
Dave Simmons 2020-08-13T19:22:46.066600Z

cheers

Dave Simmons 2020-08-13T19:24:24.067100Z

(def conn {:datasource db/db})

Dave Simmons 2020-08-13T19:24:37.067300Z

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

Dave Simmons 2020-08-13T19:24:39.067500Z

cheers