- go 1.16
- docker & docker-compose
- redis
- evans or bloom rpc
- postman or curl
docker-compose build
docker-compose up
Install REDIS
Create local-config.yaml file in config directory:
appconfig:
ip: "0.0.0.0"
grpc_port: "7001"
http_port: "8080"
redis:
db: 0
host: "0.0.0.0"
port: "6379"
password: ""
go build -o fibonacci-service cmd/main.go
./fibonacci-service -config-path ./config/local-config.yaml
go run cmd/main.go -config-path ./config/local-config.yaml
make evans name=fibonacci port=7001
call FibonacciSequences
evans api/fibonacci.proto -p 7001
call FibonacciSequences
POST http://localhost:8080/api/v1/fibonacci_sequences
{
"x":5,
"y":15
}
Install POSTMAN
curl -XPOST -H "Content-type: application/json" -d '{"x":5, "y":15}' 'http://localhost:8080/api/v1/fibonacci_sequences'