rwdaigle / increment.io

A simple webservice for counting click-throughs and other events for URLs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

increment.io

A simple webservice for counting click-throughs and other events for URLs.

Usage

Incrementing

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.

Getting Counts

/get?url=http://google.com

{
  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
}

Development

npm install
foreman start

License

MIT

About

A simple webservice for counting click-throughs and other events for URLs.


Languages

Language:CoffeeScript 83.4%Language:Shell 11.3%Language:JavaScript 5.3%