This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-05
Channels
- # aleph (1)
- # announcements (1)
- # babashka (6)
- # beginners (25)
- # biff (6)
- # calva (61)
- # clojure (15)
- # clojure-europe (2)
- # clojurescript (34)
- # cursive (7)
- # events (2)
- # figwheel-main (5)
- # fulcro (10)
- # gratitude (1)
- # malli (2)
- # pathom (1)
- # polylith (3)
- # portal (1)
- # re-frame (3)
- # reagent (10)
- # releases (2)
- # shadow-cljs (19)
- # spacemacs (5)
- # xtdb (2)
Is it possible to define :open-url
dynamically in figwheel configuration?
I have this right now:
:open-url ""
I need the port to be configurable - sort of like [[server-port]]
but not quite because the port here is the backend server port which is configured separately - by default, we use 5000, I use 5001, somebody else might use something different.
Right now, I can only think of parsing the port number from the config (`profiles.clj`) and dynamically updating figwheel-main.edn
before figwheel build is started.The best thing I was able to come with was renaming my current figwheel-main.edn to figwheel-main.edn.template and create a script that will automatically generate figwheel-main.edn with proper port by reading it first from profiles.clj.
server_port=$(cat profiles.clj | bb '(get-in *input* [:profiles/dev :env :options :port])')
sed "s/\[\[server-port\]\]/${server_port}/" figwheel-main.edn.template > figwheel-main.edn