Fork me on GitHub

Is there anyway to ./ with a different :websocket-host ?


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 ./ 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" ./


Thanks Tony!

Daniel Hines19:03:43

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


defquery-root & defentity query are on the server

Daniel Hines19:03:01

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.

Daniel Hines19:03:20

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

Daniel Hines17:04:52

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!


you're welcome 🙂 also new mostly js/node & python. now trying to figure out this java stuff 😄