Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 560 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 560 Bytes

Tornado URL Shortener

This is a simple URL shortening service using Tornado with MongoDB.

The alphanumeric short URL ID is generated by converting the unique ObjectID from the database to base 62.

Usage

Install the requirements:

$ pip install -r requirements

Run mongoDB in the background and launch the application:

$ python app.py

Shortening URL:

$ curl -d "url=http://www.google.com" -X POST http://localhost:8888/shorten_url

{"shortened_url": "http://localhost:8888/aphWksqszqdiCs3y"}

Run tests:

$ python tests/run_tests.py