This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-31
Channels
- # aws (1)
- # beginners (82)
- # boot (7)
- # cider (1)
- # cljs-dev (13)
- # cljsrn (1)
- # clojure (37)
- # clojure-dev (5)
- # clojure-italy (5)
- # clojure-spec (9)
- # clojure-uk (8)
- # clojurescript (110)
- # community-development (6)
- # datomic (1)
- # devcards (1)
- # fulcro (12)
- # lein-figwheel (1)
- # off-topic (34)
- # portkey (24)
- # protorepl (25)
- # re-frame (4)
- # reagent (29)
- # shadow-cljs (8)
- # spacemacs (11)
- # specter (3)
- # unrepl (1)
- # vim (1)
I tried added :websocket-host :js-client-host
to tutorial
id in project.clj
but that didn't work... I ended up having to edit the compiled resources/public/js/tutorial/figwheel/client/socket.js
manually.
JVM_OPTS=-Dfigwheel.port=8001 ./run-tutorial.sh
should do it for JDK8. The console message will still say 8080, but you can ignore it. For JDK 9, you’ll need: JVM_OPTS="--add-modules java.xml.bind -Dfigwheel.port=8001" ./run-tutorial.sh
Forgive me if I just haven't gotten far enough in the docs, but should all the reads I define with defquery-root
or defentity-query
be synchronous? So far in the guide examples, it's all hand-coded data, but when I rip that out, I don't see a callback I would hand to some async code (i.e, database or REST query). Or am I missing something about multimethods (those are still fuzzy for me)?
Right. Isn't that where I would put my database code?
yep, but it has to return the value. No idea how that could be async. I wait for the response from the db and then format and return.
Ok, cool. I guess since most of my experience is with JS/node, I'm used to EVERYTHING being async/promise/observable, etc. Thank you!
i think it's easy to forget that JS is so async-dependent because it doesn't have threads. Clojure does have threads
That’s fair. I hadn’t thought about it, but since my database requests will be instigated by requests to fulcro server, they will probably each be handled in their own thread already by the http server it’s built on. Thanks for the reminder!