In order to facilitate multi-user exploration of syn, without the use of ngrok or similar, I wanted to launch an external linux server and run the server component of syn there.
Changes
To make this work with the web UI, I added a "host" field to the interface to allow the UI to connect to any host, not just localhost. Note: I have not yet tried this within the electron context.
While one can manually start hc sandbox ... (or holochain ...) for each node on their server, we simplify this by adding a script (bin/dev.sh) which:
aggressively kills any existing (presumed orphan) processes (hc, lair, etc)
starts however many servers you specify via hc sandbox ...
start hc nodes on ports 8000, 8001, 8002...
and since hc binds to localhost only, we expose these servers via socat on 9000, 9001, 9002...
We also add a working nix config for OSX, and use that in the above script, if we are running on OSX.
We add a systemd syn.service startup file, so that we can run the script in the background, restart on crash or reboot, etc
Context
In order to facilitate multi-user exploration of syn, without the use of ngrok or similar, I wanted to launch an external linux server and run the server component of syn there.
Changes
hc sandbox ...
(orholochain ...
) for each node on their server, we simplify this by adding a script (bin/dev.sh
) which:hc sandbox ...