Simple microservice example based on Golang
- First you should install Go into your operation system
- run service 1
go run service1.go
- run service 2
go run service2.go
- run gateway
go run gateway.go
- Run (for example via curl or your browser) http://localhost:8080/service1 (You should see message from service1 called via microservice gateway)
- Run (for example via curl or your browser) http://localhost:8080/service2 (You should see message from service2 called via microservice gateway)
- Run (for example via curl or your browser) http://localhost:8081/ (You should see message from service1 called via service1 directly)
- Run (for example via curl or your browser) http://localhost:8082/ (You should see message from service1 called via service2 directly)
- git clone this project
- For start: go to project dir and run
docker-compose up --build
- For stop:
docker-compose down