No description
Find a file
2011-06-20 02:59:55 +00:00
lib adding support for file uploading to s3 2010-10-27 20:05:12 -07:00
public adding cufon scrips 2011-06-20 02:59:42 +00:00
views adding index view 2011-06-20 02:59:55 +00:00
.gitignore ignoring new unicorn stuff 2011-06-19 20:41:56 +00:00
config.ru cleaning out comments from config.ru file 2010-09-14 13:16:06 +08:00
Gemfile adding support for file uploading to s3 2010-10-27 20:05:12 -07:00
Gemfile.lock adding updated Gemfile.lock to include aws-s3 gem. 2010-10-27 20:07:12 -07:00
main.rb adding support for file uploading to s3 2010-10-27 20:05:12 -07:00
README.markdown added note about file uploading with warning that it is buggy 2010-10-28 09:40:12 -07:00

Shorten

Shorten is an extremely simple Sinatra based URL shortener. There is almost no UI and only the most basic of functionality.

You can see an example of this service running at ➼.ws.

File uploading with an Amazon S3 backend has been recently uploaded and works but is known to be very buggy. YMMV.

Installation

Clone

$ git clone git://github.com/amdavidson/shorten.git

Install required gems

$ gem install rack sinatra sequel anybase pg

Optional: Install the Heroku gem if you want to deploy on Heroku.

$ gem install heroku

Deploy

In the application directory run the following commands

$ heroku create

Configure the application per below.

$ git push heroku master

Configure

Open main.rb in your favorite editor and change this block: Shorten = OpenStruct.new( :base_url => "http://xn--8gi.ws/", :service_name => "➼.ws", :button_text => "➼", :path_size => 4 )

Enjoy

You now have your own running URL shortener. Now use domai.nr or name.com to find yourself an available, short URL and reconfigure main.rb

History

This is a fork of the original Shorten application created by Andrew Pilsch. I made some updates to randomize the shortened URL in the style of bit.ly and tr.im. I have also modified the software to be easy to deploy to Heroku.