Simple url shortener written on ruby using em-hiredis and sinatra. Needs to redis be installed.
$ bundle
$ rake
$ curl --header "Content-Type: application/json" \
--request POST \
--data '{"longUrl": "https://google.com"}' \
http://localhost:1234/
{"url":"http://localhost:1234/1X8jx44s"}
$ curl -i http://localhost:1234/1X8jx44s
HTTP/1.1 301 Moved Permanently
Content-Type: text/html;charset=utf-8
Location: https://google.com
Content-Length: 0
Connection: keep-alive
Server: thin