Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (23 sloc) 1 KB url shorten service

This is the source code of is written by Python with Tornado.

Generate shorten url interface

curl -d "url="

Return short url if success. You can check whether the response is started with http: to determine if it is successful.

If fail, it returns the error message.


Copy etc/ to etc/ and modify it if necessary.


Run pip install -r requirements.txt to install dependency. We advise you to install them in virtualenv.

$ virtualenv .env
$ source .env/bin/activate
$ pip install -r requirements.txt

Simple deploy

And you can run execute ./ to run it.

By supervisor

Copy etc/supervisor/ to your supervisord config folder, and modify it accordingly. Then you can run it with supervisord.

It will open two processes that listen on 8850, 8851, you can use etc/nginx/ as your nginx config to proxy it.