github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/stream/README.md (about)

     1  # Stream
     2  
     3  This is an example of a streaming service and two clients, a streaming rpc client and a client using websockets.
     4  
     5  ## Contents
     6  
     7  - server - is the service
     8  - client - is the rpc client
     9  - web - is the websocket client
    10  
    11  ## Run the example
    12  
    13  Run the service
    14  
    15  ```shell
    16  go run server/main.go
    17  ```
    18  
    19  Run the client
    20  
    21  ```shell
    22  go run client/main.go
    23  ```
    24  
    25  Run the micro web reverse proxy for the websocket client
    26  
    27  ``` shell
    28  micro web
    29  ```
    30  
    31  Run the websocket client
    32  
    33  ```shell
    34  cd web # must be in the web directory to serve static files.
    35  go run main.go
    36  ```
    37  
    38  Visit http://localhost:8082/stream and send a request!
    39  
    40  And that's all there is to it.