I have two requirements:
- Using Vagrant to get a “clone and go” experience for my team.
- Being able to dev multiple Figwheel apps on the same machine at once, which requires port juggling.
To do this, there needs to be some port forwarding magic.
Thus far, I have:
- The main REPL fixed to port 30000 (via
project.clj) on the guest, which I use an env var on
vagrant upin the host to dynamically set at VM launch time.
- The web server port 10555 on the guest (default) mapped via host env var at VM launch time for the browser to connect to.
Where I’m stuck is the Figwheel websocket.
- How do I fix the port so that I can tell Vagrant to map it to a fixed port on the host for the browser-process JS to connect to?
- What is the easiest way to allow the fixed host port to vary between VM launches? (I can do this with host env vars for
vagrant up, but this wouldn’t propagate into the guest OS at