A simple Sinatra application designed to help you quickly generate shortened (example: http://amzn.to/HTgg1c) Amazon product links with your affiliate tag. Exposes both a simple webform and an API.
Designed to be hosted on Heroku.
Assuming you already have a Heroku account set up and the Heroku tools installed, you need a bit.ly account.
- Clone this repo -
git clone git@github.com:tkrajcar/amzn.git amzn && cd amzn
- Create the Heroku app -
heroku create my-amzn
- Push the code -
git push heroku master
- Configure your affiliate tag -
heroku config:set AMAZON_AFFILIATE_TAG=mytag-20
- Configure your bit.ly username -
heroku config:set BITLY_LOGIN=mylogin
- Configure your bit.ly api key -
heroku config:set BITLY_API_KEY=abcde12345
- Use and enjoy -
heroku open