This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-13
Channels
- # babashka (10)
- # beginners (27)
- # calva (91)
- # cestmeetup (3)
- # cider (27)
- # clj-kondo (12)
- # cljs-dev (4)
- # clojars (13)
- # clojure (35)
- # clojure-europe (30)
- # clojure-france (3)
- # clojure-houston (1)
- # clojure-nl (11)
- # clojure-norway (29)
- # clojure-spec (23)
- # clojure-sweden (5)
- # clojure-uk (128)
- # clojurescript (69)
- # conjure (44)
- # core-async (27)
- # cursive (13)
- # emacs (9)
- # events (3)
- # fulcro (52)
- # graphql (4)
- # jobs (2)
- # jobs-discuss (46)
- # kaocha (4)
- # luminus (12)
- # nrepl (10)
- # off-topic (29)
- # re-frame (17)
- # reitit (20)
- # remote-jobs (4)
- # rewrite-clj (1)
- # ring (4)
- # rum (13)
- # shadow-cljs (40)
- # sql (1)
- # xtdb (1)
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