A simple webservice for counting click-throughs and other events for URLs.
To increment the count for a URL, pass url
and optionally action
to the base
path as query params. The default action is redirect
, but you can specify any value you want. The
redirect action will redirect to the given URL, while any other action will
return a JSON object with the updated count.
- increment.io?url=http://google.com
- increment.io?url=http://zeke.sikelianos.com&action=upvote
- increment.io?url=http://zeke.sikelianos.com&action=downvote
{
action: "redirect",
url: "http://google.com",
count: 5
}
/get?url=http://zeke.sikelianos.com&action=upvote
{
action: "upvote",
url: "http://zeke.sikelianos.com",
count: 22
}
npm install
foreman start
MIT