Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Personal URL shortening with CouchDB

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 shows
Octocat-spinner-32 templates
Octocat-spinner-32 updates
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES.md
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 THANKS.md
Octocat-spinner-32 rewrites.json
Octocat-spinner-32 validate_doc_update.js
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.
Something went wrong with that request. Please try again.