-
server
url
: localhost:4040 -
client
url
: localhost:8080
curl -X GET http://localhost:8080/add/1/1
2xx
{
"success": true,
"data": {
"result": 2
}
}
4xx
{
"success": false,
"data": {
"error_msg":{}
}
}
curl -X GET http://localhost:8080/mul/2/2
2xx
{
"success": true,
"data": {
"result": 4
}
}
4xx
{
"success": false,
"data": {
"error_msg":{}
}
}
curl -X GET http://localhost:8080/div/20/4
2xx
{
"success": true,
"data": {
"result": 5
}
}
4xx
{
"success": false,
"data": {
"error_msg":{}
}
}
curl -X GET http://localhost:8080/red/100/1
2xx
{
"success": true,
"data": {
"result": 99
}
}
4xx
{
"success": false,
"data": {
"error_msg":{}
}
}
- turn on grpc server with command :
make server.on
- don't forget also turn on client :
make client.on
- running test
go test -v -run=. github.com/fanchann/grpc_math/tests