1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00
go-micro/examples/stream
2020-12-26 15:21:29 +00:00
..
client rename imports 2020-12-26 15:21:29 +00:00
server rename imports 2020-12-26 15:21:29 +00:00
web rename imports 2020-12-26 15:21:29 +00:00
README.md Add examples 2020-12-26 15:17:20 +00:00

Stream

This is an example of a streaming service and two clients, a streaming rpc client and a client using websockets.

Contents

  • server - is the service
  • client - is the rpc client
  • web - is the websocket client

Run the example

Run the service

go run server/main.go

Run the client

go run client/main.go

Run the micro web reverse proxy for the websocket client

micro web

Run the websocket client

cd web # must be in the web directory to serve static files.
go run main.go

Visit http://localhost:8082/stream and send a request!

And that's all there is to it.