Skip to content
/ io Public
forked from janl/io

Personal URL shortening with CouchDB

License

Notifications You must be signed in to change notification settings

jchris/io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Personal URL shortening with CouchDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%