This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-11
Channels
- # announcements (3)
- # aws (3)
- # babashka (79)
- # beginners (105)
- # calva (10)
- # chlorine-clover (22)
- # clj-kondo (12)
- # cljs-dev (39)
- # clojure (52)
- # clojure-europe (1)
- # clojure-spec (15)
- # clojure-uk (12)
- # clojurescript (47)
- # conjure (93)
- # data-science (1)
- # datomic (10)
- # emacs (6)
- # figwheel-main (14)
- # fulcro (30)
- # instaparse (3)
- # kaocha (2)
- # lambdaisland (3)
- # malli (2)
- # meander (6)
- # off-topic (27)
- # pathom (14)
- # perun (1)
- # reagent (15)
- # shadow-cljs (69)
- # slack-help (2)
- # spacemacs (5)
- # test-check (23)
- # vim (9)
is there a way I can manually connect to a remote running figwheel repl? Basically, I want to set `:connect-url` dynamically in my cljs runtime, and manually trigger the connect, rather than automatically and hardcoded connect-url in the build
This isn't exactly what you had in mind and so maybe won't scratch your particular itch but I run Figwheel on a remote server. My solution is to run Node, use that as the 'default' client and then set all Figwheel to broadcast all messages to all clients.
Here's my Node script: https://github.com/pyrmont/pondent/blob/master/fig.js
Hm, I see. Yeah, not sure if it's helpful. Basically, what I want to be able to do, is stop figwheel from making the client > server connection automatically, and make it on-demand, so I can ship it to our staging environment as well, and if testers/product team finds issues, they can click one button for me to get a live repl session into their browser session. If that makes sense
No, it does. It's an interesting idea. I never thought about trying to do it that way.
Yeah, currently have a kind of manual step, where there is a debug bar with a button that takes the app-db re-frame is using, serializes it and POST it to a server that stores it and gives a ID back, then testers/product send me that ID and I can inject the session locally. Just want to make it a bit smoother and with a live env as well
I might just open a issue in figwheel-main instead, get more eyes and maybe someone has a solution already. Thanks a lot though @UG9H141FX 🙂
Here's my dev environment:
^{:watch-dirs ["src", "test"]
:broadcast true
:css-dirs ["resources/public/css"]
:cljs-devtools false
:launch-js ["node" "fig.js" :open-url]
:open-url "<http://[%5Bserver-hostname%5D]:%5B%5Bserver-port%5D%5D/index.html|http://[[server-hostname]]:[[server-port]]/index.html>"
:ring-server-options {:host <server URL> :port 8000}}
{:main pondent.core}}
If you had your testers run this on their machines, you'd be able to connect to their instances.
Oh, well, no, it would give you that on the staging server. You'd have to SSH into that and access the REPL remotely. The problem would be that every tester would be receiving all messages from every other connected user which I think might bork things if you have more than one tester at a time.
Hm, interesting. Yeah, might be able to turn it around somehow with what you gave me. Thanks a lot!
seems I should be able to use figwheel.repl/connect
somehow to do this, from https://github.com/bhauman/figwheel-repl/blob/master/src/figwheel/repl/preload.cljs