devroom.io/content/blog/2010-06-06-setup-your-own-firefly-url-shortener-in-25-minutes.md

34 lines
1.5 KiB
Markdown

+++
date = "2010-06-06"
title = "Setup your own Firefly URL shortener in 2.5 minutes"
tags = ["firefly"]
slug = "setup-your-own-firefly-url-shortener-in-25-minutes"
+++
By popular demand I've setup a guide to setup your own personal URL shortener with [Firefly][1] and [Heroku][2]. I've timed it an you can do it in under 2.5 minutes. How's that for fast?
[1]: http://github.com/ariejan/firefly
[2]: http://heroku.com
~
I'm going to assume that you have `git` installed on your computer and that you have an already working Heroku account. If not, [sign up here for Heroku first][3].
I'll be referencing to a `my_firefly_dir` in this guide. You can just pick a name during step 2 and it will be created for you.
1. `gem install heroku`
2. `git clone git://github.com/ariejan/firefly-heroku.git my_firefly_dir`
3. `cd my_firefly_dir`
4. `heroku create`
5. Use the URL returned by `heroku create` and use the FQDN (xxxx.heroku.com) to configure the `hostname` in `config.ru`. Like: `set :hostname, 'xxxx.heroku.com'`
6. Change the API key in `config.ru` to something more secure.
7. Commit your changes with `git commit -am 'Updated hostname and apikey'`
8. `git push heroku master`
9. Done! Open your app with `heroku open`
So, there's no excuse not to try Firefly now! Use the included _bookmarklet_ to quickly shorten URLs from your browser or use the `firefly-client` gem to enable shortening in your own application!
Please, let me know if you did a succesfull install of Firefly and what you think about it.
[3]: http://api.heroku.com/signup