public
Description: Personal URL shortening with CouchDB
Homepage:
Clone URL: git://github.com/janl/io.git
io /
name age message
file .gitignore Fri Nov 27 07:22:19 -0800 2009 ignore [janl]
file LICENSE Sat Oct 10 23:28:21 -0700 2009 add license & readme [Jan Lehnardt]
file README Sun Oct 11 00:57:31 -0700 2009 reorder [Jan Lehnardt]
directory lists/ Fri Oct 23 07:23:36 -0700 2009 style [Jan Lehnardt]
directory shows/ Fri Oct 23 07:08:13 -0700 2009 add stats [Jan Lehnardt]
directory templates/ Thu Nov 05 03:35:59 -0800 2009 cosmetics [janl]
directory updates/ Fri Oct 23 07:08:13 -0700 2009 add stats [Jan Lehnardt]
file validate_doc_update.js Mon Oct 12 16:22:53 -0700 2009 this is my house [Jan Lehnardt]
directory vendor/ Fri Oct 23 07:08:13 -0700 2009 add stats [Jan Lehnardt]
directory views/ Fri Oct 23 07:08:13 -0700 2009 add stats [Jan Lehnardt]
README
The cool stuff happens in updates/shorten.js and shows/long.js

Create a short:

curl -X POST http://127.0.0.1:5984/io/_design/io/_update/shorten?target=http://zombo.com/

You should see:

  Shortened to yvHa

Get the redirect:

http://127.0.0.1:5984/io/_design/io/_show/long/yvHa

For maximum effect, deploy behind an HTTP proxy that aliases / to 
http://127.0.0.1:5984/io/_design/io/_show/long/

--

Go to http://127.0.0.1:5984/io/_design/io/_list/index/shorts to see a list of
all shortened URLs.

The list & view that power this make this > 30 LoC, but the updates/shorten.js
and shows/long.js are still tight.