This way you don't have to bother about the server side, nor about building the frontend, and you will get only the `tty-share` cmd line tool, inside `out` folder.
For cross-compilation you can use the GO building [environment variables](https://golang.org/doc/install/source#environment). For example, to build the `tty-share` for raspberrypi, you can do `GOOS=linux GOARCH=arm make out/tty-share`.
## Building and running everything
For an easy deployment, the `tty-server` is by bundling by default all frontend resources inside the final binary. So in the end, there will be only one file to be copied and deployed. However, the frontend resources can also be served from a local folder, with a command line flag.
@ -50,7 +52,7 @@ nvm use
npm install
npm run build # builds the frontend
cd -
make all # builds both the sender and server
make all # builds both the sender and server. Check the Makefile for more details
webAddress:=flag.String("web_address",":80","The bind address for the web interface")
senderAddress:=flag.String("sender_address",":6543","The bind address for the tty-share connections")
url:=flag.String("url","http://localhost","The public web URL the server will be accessible at")
frontendPath:=flag.String("frontend_path","","The path to the frontend resources")
webAddress:=flag.String("web_address",":80","The bind address for the web interface. This is the listening address for the web server that hosts the \"browser terminal\". You might want to change this if you don't want to use the port 80, or only bind the localhost.")
senderAddress:=flag.String("sender_address",":6543","The bind address for the tty-share TLS connections. tty-share tool will connect to this address.")
url:=flag.String("url","http://localhost","The public web URL the server will be accessible at. This will be sent back to the tty-share tool to display it to the user.")
frontendPath:=flag.String("frontend_path","","The path to the frontend resources. By default, these resources are included in the server binary, so you only need this path if you don't want to use the bundled ones.")