Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A URL shortener.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.markdown
Octocat-spinner-32 config.ru
Octocat-spinner-32 main.rb
README.markdown

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 vi.gl.

In this fork, the upload capability of the original has been entirely removed as it was announced as buggy.

Installation

Clone

$ git clone git://github.com/oisin/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://vi.gl/", :service_name => "vi.gl", :button_text => "vi.gl", :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 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.

Something went wrong with that request. Please try again.