Fork me on GitHub

you can provide a path to the node command in :node-command and you can provide false to :inspect-node if inspect is mucking things up


@bhauman, I tried these as well, no luck so far. Though, I was able to have a different setup, which is sufficient for my needs as of now. I switched to using Nw.js, combining both Nodejs and Browser envs


I'll probably circle back to the proper setup later on.


Is there a way to start figwheel REPL as a socket repl? I have not dug into this much yet myself (apologies for not doing the leg work 😞 ). My goal is to connect the figwheel REPL to Chlorine (atom). Chlorine supports nrepl now, but I was curious if there is a straightforward process for getting a socket version of the Figwheel REPL.


@tkjone I would go with the nrepl piggieback method


remember that you are starting a clojure repl and then launching a cljs-figwheel repl inside of it


so its technically possible, it just depends how chlorine handles this repl-within-a-repl setup


Thanks! Understood 👍


@tkjone a snippet of code I am using, if you want to experiment. I am not using Chlorine

(defn start-prepl [repl-env port]
  "This cannot be used by Cursive - yet. When it does, we can let nREPL go"
  (println "Starting a prepl on port" port)
  (server/start-server {:accept  'cljs.core.server/io-prepl
                        :address ""
                        :port    port
                        :name    "prepl-figwheel"
                        :args    [:repl-env repl-env]}))

(defn start-cljs-repl []
  (let [build-id "common"]
        (figwheel.main.api/start {:mode :serve} build-id)
        (start-prepl (figwheel.main.api/repl-env build-id) 9002)
        (figwheel.main.api/cljs-repl build-id)
        (catch RuntimeException _e
          (println "The build is already running, connection to the REPL only")
          (figwheel.main.api/cljs-repl build-id))))))


While it’s true that Cursive doesn’t support prepl, Cursive’s socket REPL support is very similar:


To use this, just create a normal socket REPL and connect to it.


latest figwheel-main 0.2.10-SNAPSHOT has a :use-ssl figwheel option that when set to true will attempt to automatically setup a cert for localhost, using the certifiable library


so you get https in one config option


certifiable needs some help getting it to work on all platforms properly,