This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-07
Channels
- # admin-announcements (19)
- # announcements (1)
- # beginners (14)
- # boot (244)
- # cider (2)
- # clojure (23)
- # clojure-dev (23)
- # clojure-poland (55)
- # clojure-russia (118)
- # clojure-uk (4)
- # clojurescript (143)
- # core-async (31)
- # core-logic (1)
- # cursive (30)
- # datascript (2)
- # datomic (3)
- # emacs (7)
- # hoplon (40)
- # ldnclj (8)
- # off-topic (2)
- # om (64)
- # reagent (10)
- # ring (1)
- # yada (71)
@mynomoto: in the castra chat demo (get-state)
rpc call, is this line for (nil? user)
needed?
@flyboarder: I'm not sure, I remember finding that odd too but I think removing it caused some kind of trouble.
doesnt the rpc call fail if any of the :rpc/pre
return a false value?
strange, then the initial call to (get-state)
on the client would fail? 😕
ok i see i think
So the initial call will go through because the user is nil
on it. https://github.com/hoplon/demos/blob/master/castra-chat/src/cljs/demo/state/chat.cljs#L55
so in the initial call user is nil and it fails on the login check
gtg now, but you can just ask questions here, someone will get to it, maybe myself tomorrow.
thanks
Yeah, it fails because of https://github.com/hoplon/demos/blob/master/castra-chat/src/castra/demo/http/rules.clj#L30
and the other rpc calls which use it ignore the :rpc/pre
, i think i get it
so the only :rpc/pre which is used is the originating one
@flyboarder: yeah, this is how it works.
https://github.com/staltz/flux-challenge needs Hoplon takers
@onetom: you mentioned you were using castra with a db backend previously, im wondering how you are handling the db connection?
how are you storing the db connection? in a local scope on the castra call or should i be persisting the db connection to a state cell?
my thought was to keep all db stuff on the server
mongodb, my intent was to do something like the following http://clojuremongodb.info/articles/integration.html#using_mongodbbacked_ring_session_store_with_monger
sorry still trying to sort out how this all falls into place with the technologies we wanted to use
i haven't heard of datomic before, looking into it
and im serving it with boot-http
like this:
(serve :port 3001
:reload true
:handler 'appboard.api/ring-handler)
i checked if i have any example source to open up, but i only have a boot1/hoplon5 solution
flyboarder: im about to sleep coz it's 3am here. if u have any questions, shoot them quick 😉 i will be up in 5 hours though so i can answer then too
have a good night, im just reading the castra source for now, thanks for the help i need to dive into the ring sessions more
as u can see i had a comment in my source about an article which helped me to understand things a bit better; it might help u too
@micha: is the wrap-castra-session
required if I wanted to use another session store?
@flyboarder: no, it's just to simplify sessions when using CORS