This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-24
Channels
- # beginners (19)
- # boot (118)
- # capetown (4)
- # cider (37)
- # cljs-dev (69)
- # cljsjs (23)
- # clojure (212)
- # clojure-austin (10)
- # clojure-india (3)
- # clojure-italy (2)
- # clojure-mke (1)
- # clojure-nl (1)
- # clojure-russia (5)
- # clojure-spec (52)
- # clojure-uk (86)
- # clojurescript (31)
- # core-async (9)
- # cursive (123)
- # datomic (91)
- # emacs (22)
- # events (3)
- # hoplon (68)
- # klipse (4)
- # lambdaisland (10)
- # leiningen (2)
- # off-topic (14)
- # om (14)
- # onyx (44)
- # perun (14)
- # proton (20)
- # re-frame (15)
- # reagent (10)
- # ring-swagger (9)
- # specter (18)
- # untangled (3)
- # vim (26)
- # yada (4)
I just discovered how to disable logging in om.next
. Wrote an (interactive) article about it
And updated the doc with the missing information about :logger
option in the reconciler creation
@viebel FWIW you can also disable logging at compile time by setting a closure define goog.DEBUG false
(which you should probably be doing for production builds)
Thanks @anmonteiro . Although in my case (klipse web app) I need to be able to switch on and off the logger via a url parameter
Question, and pardon the basic-ness: I have a server.clj that can do ring-sessions for logins... but how can I access session variables via cljs? Like, if my user is logged in when they hit my endpoint, and then my om app loads, how can I make sure that the user remains logged in? Is there a way to see the ring session headers / vars in clojurescript?
@sova since your clojurescript app is running entirely on the client the only time it will see headers is in a response from the server. Being logged in is likely a combination of a session on the server and, during a request/response cycle between the client-app and the server, some authenticating token in the request or a cookie
personally, I recommend having an endpoint you hit with a token in hand that either gives you information about the authenticated user or an error if you need to log in
* an endpoint you hit from your clientside app
@solussd I see what you mean, thanks that was my intuition on the topic... It's just kinda strange that my server will "know" a person is logged in thanks to ring-session but then the javascript app (which gets loaded by this very server) must make a telephone call to find out what state it's in
So I'm using sockets with sente. Seems like an okay way to pass back a solution? Like on app load, send a signal to the server that asks for credentials/identity... seems good?
I was thinking about injecting a token/hash into the html page that serves the app... assuming the javascript application can access the whole DOM once it is loaded...