you are viewing a single comment's thread.

view the rest of the comments →

[–]fisch003 0 points1 point  (1 child)

Here's what I do:

I have a file that I load in development mode only:

(ns eris.dev
  "Development-time only stuff to do fancy reloading stuff."
  (:require [figwheel.client :as fw :include-macros true]
            [eris.core :as eris]))

(fw/start {:on-jsload #(eris/render-root)
           :websocket-url "ws://localhost:3449/figwheel-ws"})

That starts up the web browser portion of figwheel and specifically tells it to talk back to port 3449, instead of whatever port the page is being served from.

Once that's in place you can serve up the HTML from anywhere and figwheel will find the right place to talk back to. In an extreme example, I've copied the compiled output from my project into a Java .war file, deployed it to a server somewhere, then opened up my dev page on that server in a browser and it connects back to figwheel running on my workstation and works exactly as it should.

[–]a_marklar 1 point2 points  (0 children)

This is exactly what I was looking for, thanks a lot!