Some featurs of the appication
- Creat key value pairs
- Get value of a key
- Watch for changes in the key value pairs stored
docker pull liquidslr/storeservice
docker run --rm -p 3000:3000 liquidslr/storeservice
docker build -t storeservice .
docker run --rm -p 3000:3000 storeservice start
docker exec -it CONTAINERID /bin/bash
./myapp put --key=newkey --value=newvalue
./myapp get --key=newkey
./myapp watch
The command below will create a binary file of the service
dep ensure
go build
Usage:
store [command]
Available Commands:
get Prints value of key stored in db
help Help about any command
put Create a key value pair
start Start the web server, The default port is 3000
watch Watch for changes in key value pairs
Flags:
-h, --help help for store
Use "store [command] --help" for more information about a command.
./storeservice start
./storeservice put --key=newkey --value=newvalue
./storeservice get --key=newkey
./storeservice watch
curl -d '{"key":"newkey", "value":"newvalue"}' -H "Content-Type: application/json" -X POST http://localhost:3000/api/set/value/
curl localhost:3000/api/value/{key}
curl localhost:3000/api/get/all/