This is an example of a bot command as a microservice
- main.go - is the main definition of the service and handler
Micro services need a discovery system so they can find each other. Micro uses consul by default but its easily swapped out with etcd, kubernetes, or various other systems. We'll run consul for convenience.
Install consul
brew install consul
Alternative instructions - https://www.consul.io/intro/getting-started/install.html
Run Consul
consul agent -dev
Run the service
go run main.go
Run the bot and send message command