Fork me on GitHub
#figwheel
<
2019-05-03
>
Diego18:05:21

Hey all, I am exploring how nrepl and fighwheel work and would like to be able to send values programatically to fighwheel so that I can print the results on the browser console. I know that I can send something with this code to nrepl

(require '[nrepl.core :as nrepl])

(with-open [conn (nrepl/connect :port 7002)]
     (-> (nrepl/client conn 1000)    ; message receive timeout required
         (nrepl/message {:op "eval" :code "(js/console.log 2 3)"})
         nrepl/response-values))
But my figwheel repl is not sending the value to the browser. The idea is to be able to send values from clojure and see them printed in chrome’s console which is rather nice. (for large data structures)

Diego18:05:44

Although perhaps there are better tools for the job, so I would love to know