Example of API server send message to websocket server
API Server -> WS server -> Browser (Not showing here)
Open terminal, run ws server
go run ws.go
Open another terminal tab, run api server
go run api.go
Open another terminal tab, run the following command to call the api server
curl http://127.0.0.1:8081
A message will appear on ws server terminal tab