Hi, newbie question. How can I change :websocket-url ? Here's my project.clj, it doesn't reflect the port I specified. https://gist.github.com/kiko/91be403a61c552aa07790f89c8db1d59#file-project-clj-L59
@kiko: without being an expert (at all), you need to define the port server side via project.clj
(I’ve been using :server-port
for this), and then make sure from the client side to connect to this. E.g. using figwheel.client/watch-and-reload
. This is where you put the :websocket-url
, and optionally a :jsload-callback
.
@luposlip Thanks. Where the figwheel.client/watch-and-reload should be placed at? By the way, https://github.com/bhauman/lein-figwheel#client-side-configuration-options says :websocket-url to be under :cljsbuild, this confuses me. oO
@kiko:
Perhaps the :websocket-url
is being inserted somewhere dynamically by cljsbuild. In my setup I have this in project.clj
:
:figwheel {:server-port 3450}
and this in dev/start.cljs
which is only compiled in development mode (as configured in project.clj
):
(figwheel.client/watch-and-reload
:websocket-url "<ws://localhost:3450/figwheel-ws>"
:jsload-callback #(js/console.log "figwheel ready"))
ohh i found that under env/dev/cljs/<app-name>/dev.cljs ...changing it and finger crossed...
beautiful, it works! 😄
Sorry today is my day 1 of cljs. Thanks a lot @luposlip!
happy to help @kiko! 🙂