- Ensure
Go 1.16is installed - Ensure
Postgres 12is installed - Run
sudo -u postgres createdb group_cache_poc- Update password of
postgresuser in ./env/config.json - Run
go build main.go- Run
./main -addr=:8080 -pool=http://localhost:8080,http://localhost:8081 &- Run
./main -addr=:8081 -pool=http://localhost:8081,http://localhost:8080 &- Database Tables will be created automatically
- 2 HTTP servers will start on ports 8080 and 8081
- get : GET
kv/get?key=k - set (upsert) : POST
kv/set?key=k&value=v
curl -X POST "localhost:8080/kv/set?key=foo&value=bar"curl "localhost:8081/kv/get?key=foo"