Fork me on GitHub

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 []
   (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 "" 
           :ip "") 
   (cljs :ids #{"main"}
         :optimizations :none
         :compiler-options {:source-map-timestamp true
                            :preloads             '[c.gui.preloads]})
   (target :dir #{"../resources/local/"})))
^-- current config


The 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


but this sounds like it's possible


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)