I have a shadow-cjs project and want to work on it in two git worktrees. Does anyone have a formula for running the :dev build from each worktree separately. The best I’ve come up with is to just duplicate the config into a :dev2 build with a different :http-port, and :proxy-url
and I don’t think this lets me set a predictable :nrepl :port
I'm not entirely sure I understand the question, why does it need a separate http-port? is the server different?
the dev http server is completely optional. all it does is serve the .js files. it has nothing to do with hot-reload or the REPL, thats an entirely separate server that is always managed for you and not configured at all. https://shadow-cljs.github.io/docs/UsersGuide.html#dev-http
:dev-http or the much older and 10+ years deprecated :devtools {:http-port ...} were always optional and only provided for convenience. any server will do.
Ah, that makes sense then. Thanks.
I would like to have the UI run separately in each worktree, with distinct backends
so just have those backends serve the .js files?
I must be misunderstanding something. I thought in dev the usual workflow was to use the shadow dev server to serve the javascript.
if you are using VSCode, then you could use dev containers for this.
in theory you do not have to change any ports. in practice you have to forward your frontend ports to different host ports to see two UIs at the same time