go build
cd kvapi
go build
Note:
should see a file called kvapi.exe (on windows) if successfully built
before starting the server ensure to cleanup previous *.dat files usingrm *.dat
in the '/kvapi' directory.
./kvapi --node 0 --http :2020 --cluster "0,:3030;1,:3031;2,:3032"
./kvapi --node 1 --http :2020 --cluster "0,:3030;1,:3031;2,:3032"
./kvapi --node 2 --http :2020 --cluster "0,:3030;1,:3031;2,:3032"
curl "http://localhost:2020/set?key=x&value=hello"
Note:
if the curl request fails, then retry another server port as the request has to go to the leader for it to be processed