This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-23
Channels
- # announcements (4)
- # bangalore-clj (1)
- # beginners (56)
- # cider (24)
- # clojure (71)
- # clojure-dev (21)
- # clojure-nl (2)
- # clojure-russia (1)
- # clojure-spec (5)
- # clojure-uk (10)
- # clojured (8)
- # core-logic (18)
- # cursive (6)
- # data-science (15)
- # duct (1)
- # figwheel-main (4)
- # fulcro (6)
- # graphql (2)
- # luminus (4)
- # nrepl (9)
- # off-topic (10)
- # pathom (10)
- # pedestal (3)
- # re-frame (10)
- # ring-swagger (1)
- # shadow-cljs (19)
- # vim (35)
hi, I am trying to get shadow-cljs running with luminus template with +cljs, but I cannot get it working
I generated the following shadow-cljs.edn:
{:source-paths ["src/cljs"]
:dependencies [[binaryage/devtools "0.9.10"]]
:nrepl {:port 9000}
:builds {:app {:target :browser
:output-dir "target/cljsbuild/public/js"
:asset-path "/js/main.js"
:modules {:main {:init-fn exp.core/init!}}
:compiler-options {:infer-externs :auto}
:devtools {:http-root "public"
:http-port 3449
:http-handler shadow.http.push-state/handle
:after-load exp.core/mount-components}}}}
but I get errors that js files in subdirectories are not found: http://localhost:3000/js/main.js/cljs-runtime/goog.debug.error.js net::ERR_ABORTED 404 (Not Found)
ok, that makes sense 🙂
cool, it seems to work now, thanks
how does the hot code reloading work in this case? I understand that shadow-cljs runs its own server on port 3449 which connects to the browser via websockets and updates the website with exp.core/mount-components when the source files are updated.
but in this case, the server runs on port 3000, so how does shadow-cljs update it?
I see, so basically as files are served from 3000, they contain in development information that they should connect to 9630 and listen for updates there?
cool, might be useful to explain this somewhere in shadow-cljs user guide (or maybe it already is explained there), because I found that quite puzzling
thx, makes sense now, when I understand everything better, but still little bit difficult for beginners to understand. In the future, I might write some beginners tutorial about all these things.