brianr / shorty

A Pyramid / React / Node.js Demo URL Shortener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shorty

Shorty is a simple URL shortener demonstration project made up of:

  • A Python Pyramid + SQLAlchemy + React UI (shorty_ui)
  • A Node.js app to resolve short URLs (shorty_resolver)
  • MySQL for persistent storage
  • Memcached to cache the short-to-long URL map

Quickstart

Prerequisites:

  • Python 2.7, working in a virtualenv with $VENV set accordingly
  • MySQL 5 installed and running, with a "shorty:shorty" user created
  • Node.js 0.10
  • Memcached listening on localhost 11211

In the shorty_ui directory:

% $VENV/bin/python setup.py develop
% $VENV/bin/python initialize_shorty_db development.ini
% $VENV/bin/pserve development.ini

In the shorty_resolver directory:

% npm install mysql
% npm install node-mysql
% node resolver.js

You'll have two webapps running:

TODO

  • Build initial Pyramid app with SQLAlchemy scaffolding
  • Build initial Node.js resolver app
  • Initial docs
  • Document scalability issues - (see scalability)
  • Add URL caching via memcached
  • Add React (+ Bootstrap) UI to Pyramid app
  • Add basic URL metrics
  • Add user/account management
  • Expose API

About

A Pyramid / React / Node.js Demo URL Shortener