Skip to content

Simple URL shortener with Ruby, Sinatra and Redis

Notifications You must be signed in to change notification settings

homeflow/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple URL shortener with Ruby, Sinatra and Redis

by Felipe Ribeiro felipernb@gmail.com

requires the following gems:

  • redis
  • sinatra
  • json
  • hiredis

It works as a REST API and to shorten an URL, one must do:

curl -X POST -d "url=http://google.com" http://YOURDOMAIN/url

The return will be a JSON with the shorturl field that contains the shortened URL (as expected :P)

When GETing the short url:

curl GENERATED_URL

The response will redirect you to the proper URL and increment the number of accesses

Stats page comming soon

About

Simple URL shortener with Ruby, Sinatra and Redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages