We have built software that consists of two parts, a GUI (front-end) running in the browser and a kernel (back-end) with Go compiled into exe.
To glue these two pieces together, we used nodejs+expressjs+socket.io running on the local machine. Nodejs talks to the browser over http/socket.io, and it also "spawn" Go exe as child_process.
Now with websocketd, we can skip the nodejs+expressjs+socket.io part. That is great.
The difficulty is: the GUI in the browser used to send JSON to nodejs, which is then written into a configuration file. Our kernel exe will read that JSON configuration file to determine what to do.
I guess one cannot send JSON over STDIN/STDOUT. I can certainly do command line "flag" for Go to parse.
Question: Is there a better way doing this?