Skip to content

Rafe/n37.co

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N37 Url Shortener

What is this?

This is a sample url shortener build on expressjs, redis, bootstrap and coffeescript. Can be easily deployed on heroku with Redistogo addon.

Why n37?

Because all other meaningful 3 letter domain name is registered.

Run local

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

Deploy to heroku

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

More details on implmentation and algorithm is on this post

Copyright: MIT Licence