This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-04
Channels
- # aws (3)
- # beginners (63)
- # boot (10)
- # cljs-dev (14)
- # cljsrn (10)
- # clojars (4)
- # clojure (132)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (1)
- # clojurescript (206)
- # css (3)
- # datascript (5)
- # lein-figwheel (1)
- # leiningen (1)
- # off-topic (48)
- # re-frame (18)
- # reagent (29)
- # specter (4)
- # untangled (1)
- # yada (1)
Is there a way to configure boot-reload and webserver so that: (1) webserver is one machine (A) (2) boot-reload/cljs is on machine (B) (3) user visits webserver, which servedrs index.html + tells browser to pull js from machine (B) + connect to websoket on machine (B) ?
@qqq I don't have an anwer off the bat but the boot-reload
options helped me get that setup once
@richiardiandrea : ah, so you're confirming that it's possible (or, at some point in time, it was opssible) ?
(deftask remote-client-dev []
(comp
(watch)
(garden :styles-var 'c.gui.css/base)
(reload :ids #{"main"}
:on-jsload 'c.view/init
:target-path "../resources/local/"
:port 4000
:ws-port 4000
:ws-host "192.168.11.101"
:ip "192.168.11.101")
(cljs :ids #{"main"}
:optimizations :none
:compiler-options {:source-map-timestamp true
:preloads '[c.gui.preloads]})
(target :dir #{"../resources/local/"})))
^-- current configThe webserver and websocket server can be anywhere yes so as long as you serve the right things and configure the host correctly you should be fine. The host in boot-reload also counts because it is prepended to reloaded resources
awesome; I was afraid some type of cross site scripting prevention thing made this impossible
It would be great to know what actually works in detail because there are many options in boot-reload that are not necessary / misnamed. I m trying to clean up things a bit in boot-figreload
..Your mileage may vary 😀
Well CORS is always there as a problem in dev mode so you'll need to handle it at the webserver level
You will see coming it up and you can easily workaround it if necessary (ring has a plugin)