This app supports both grpc (http2) and rest (http1) services.
In order to start both services quickly with docker run the below from the root directory to tear down any stale resources and then build and run the services fresh
docker compose down --rmi all
docker compose up -d
To start either service on its own with dotnet, run one of the below from the root directory
dotnet run --project .\src\KeyValueStore.Grpc
dotnet run --project .\src\KeyValueStore.Rest
PUT method http://localhost:5000/store/testKey
body:
{
"value": "someValue2"
}
http://localhost:5000/store/testKey
DELETE method http://localhost:5000/store/testKey
grpcurl docs: https://github.com/fullstorydev/grpcurl
(below grpcurl commands executed in gitbash)
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key", "value":"some value"}' localhost:5001 Store.Put
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key"}' localhost:5001 Store.Get
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key"}' localhost:5001 Store.Delete