No description
Find a file
2010-10-27 21:32:48 -07:00
lib adding support for file uploading to s3 2010-10-27 20:05:12 -07:00
public more changes 2010-10-27 21:32:48 -07:00
views adding size value to the file input.... not sure if it has any effect 2010-10-27 21:24:41 -07:00
.gitignore adding sinatra.log to gitignore 2010-09-13 17:18:32 +08: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 small updates to readme. 2010-09-15 06:44:36 +08: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.

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.