Version Matrix


Just count whatever you want. Two steps to create a counter :

  1. Create a counters group
  2. Create your counter

It has been deployed on Visit this link to increment and get access to the counter state, or check this page directly get the current counter state

curl usage example


curl -d '{"name":"test"}' -H "Content-Type: application/json" $API/group
# extract the group ID from the response

curl -d '{"name":"counter#1"}' -H "Content-Type: application/json" $API/group/$GROUP/counter
# extract the counter ID from the response

curl $API/group/$GROUP/counter/$COUNTER

curl $API/increment/$GROUP/$COUNTER

curl $BASE/$GROUP/count/$COUNTER

curl $BASE/$GROUP/state/$COUNTER

Quick local start

Thanks to coursier from @alxarchambault, this application is quite easy to start, just execute :

cs launch fr.janalyse::counters:0.1.0


Environment variable Description default value
COUNTERS_LISTEN_IP Listening network interface ""
COUNTERS_LISTEN_PORT Listening port 8080
COUNTERS_PREFIX Add a prefix to all defined routes ""
COUNTERS_URL How this service is known from outside ""
COUNTERS_STORE_PATH Where data is stored "/tmp/counters-data"