This is a sample url shortener build on expressjs, redis, bootstrap and coffeescript. Can be easily deployed on heroku with Redistogo addon.
Because all other meaningful 3 letter domain name is registered.
First, clone the app, have node.js installed.
Install the dependency:
npm install
Then, install and start the Redis instance
redis-server
And run server
make
For deploy to heroku, first you need to have the heroku cli installed.
Then create the app with cedar stack:
heroku apps:create [NAME]
Enable the redistogo addon with nano instance on heroku
heroku addons:add redistogo:nano
Set the environment varibles on heroku:
heroku config:set NODE_ENV=production HOST=[YOUR HOSTNAME]
deploy the app to heroku:
git push heroku master
start or scale the server:
heroku ps:scale web=1
More details on implmentation and algorithm is on this post