项目作者: ThreeDotsLabs

项目描述 :
An example Go project for running local development environment, with hot code reloading.
高级语言: Go
项目地址: git://github.com/ThreeDotsLabs/nats-example.git
创建时间: 2019-01-03T08:45:29Z
项目社区:https://github.com/ThreeDotsLabs/nats-example

开源协议:MIT License

下载


nats-example

This is an example Go project for running local development environment. It features:

Read more in our blog post: Go Docker dev environment with Go Modules and live code reloading

asciicast

Running

To start the services, simply run:

  1. docker-compose up

Open new terminal and send some messages:

  1. $ curl localhost:5000 -d "this is my message"
  2. Sent message: this is my message with ID 01D09P02SBW5D0QPWP14QQZJWH

You should see the messages in the subscriber service output:

  1. subscriber_1 | [00] 2019/01/03 11:01:27 received message: 01D09P02SBW5D0QPWP14QQZJWH, payload: this is my message