toto/redis-shortener

A simple Rails based url shortener to test redis

★ 3Forks 0RubyGitHub ↗Compare

README

== Redis based Url Shortener

A very basic url shortener I wrote to try out redis.



== Installation

1. gem install redis
2. Install Redis 
3. git clone git://github.com/toto/redis-shortener.git
4. Start the Rails App

== Configuration

When you run this app on a Webserver edit config/initializers/configure_hostname.rb and
add your hostname.

== API

1. Create 

  curl http://localhost:3000/shorten.json -d 'longUrl=http://github.com'
  
2. Resolve
2a. Via Api

  curl http://localhost:3000/expand/ggtEjI.json

2b. For the rest of us

  curl http://localhost:3000/ggtEjI
  

Contributors

toto

Issues