Is there a way to handle listening for multiple Go web applications on a single port (80, for example). I am aware of ServeMux and the ability to listen for different incoming host names, but in this method they must be handled in the same program, and thus the same binary.
Would the best method be to listen for hostnames on :80 in one binary and then send the requests/response writers to another corresponding binary somewhere else? Would I use "os/exec"
for this? How would you pass in the Request
and ResponseWriter
parameters to this external binary? Thanks in advance!
EDIT:
Is it possible for goroutines of different binary origin to access each others channels? That would be a cool way to do it.