shorten/README.markdown

74 lines
1.7 KiB
Markdown
Raw Normal View History

2010-09-14 07:26:07 +00: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][example].
File uploading with an Amazon S3 backend has been recently uploaded and works but is known to be very buggy. YMMV.
2010-09-14 07:26:07 +00:00
## Installation
2010-09-14 22:44:36 +00:00
2010-09-14 07:26:07 +00:00
### Clone
$ git clone git://github.com/amdavidson/shorten.git
2010-09-14 22:44:36 +00:00
2010-09-14 07:26:07 +00:00
### Install required gems
$ gem install rack sinatra sequel anybase pg
Optional: Install the [Heroku][heroku] gem if you want to deploy on Heroku.
$ gem install heroku
2010-09-14 22:44:36 +00:00
### Deploy
In the application directory run the following commands
$ heroku create
Configure the application per below.
$ git push heroku master
2010-09-14 07:26:07 +00:00
### Configure
2010-09-14 07:28:18 +00:00
Open <code>main.rb</code> in your favorite editor and change this block:
2010-09-14 07:26:07 +00:00
Shorten = OpenStruct.new(
:base_url => "http://xn--8gi.ws/",
:service_name => "&#x27bc;.ws",
:button_text => "&#x27bc;",
:path_size => 4
2010-09-14 22:44:36 +00:00
)
2010-09-14 07:28:18 +00:00
### Enjoy
You now have your own running URL shortener. Now use [domai.nr][domainr] or [name.com][name] to find
yourself an available, short URL and reconfigure <code>main.rb</code>
2010-09-14 07:26:07 +00:00
## History
This is a fork of the original [Shorten][orig_url] application created by [Andrew Pilsch][author].
I made some updates to randomize the shortened URL in the style of [bit.ly][bitly] and
[tr.im][trim]. I have also modified the software to be easy to deploy to Heroku.
[orig_url]: http://blog.pilsch.com/past/2009/6/7/shorten_your_own_damn_urls/
[author]: http://andrew.pilsch.com/
[example]: http://xn--8gi.ws
[bitly]: http://bit.ly
[trim]: http://tr.im
2010-09-14 07:28:18 +00:00
[heroku]: http://heroku.com
[domainr]: http://domai.nr
[name]: http://name.com