The 163.gs url shorten service written by python.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
base change shorted url to method post May 12, 2014
etc
log
model abstract redis connection Sep 1, 2014
templates update readme and change to Chinese page May 14, 2014
.gitignore abstract redis connection Sep 1, 2014
LICENSE update site title and add license May 13, 2014
README.md update README for nginx config Aug 24, 2014
main.py abstract redis connection Sep 1, 2014
requirements.txt add main page and requirements.txt May 12, 2014

README.md

163.gs url shorten service

This is the source code of http://163.gs.

163.gs is written by Python with Tornado.

Generate shorten url interface

curl -d "url=http://EverET.org" http://163.gs/short/

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.

Install

Copy etc/config.py.sample to etc/config.py and modify it if necessary.

Dependency

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 ./main.py to run it.

By supervisor

Copy etc/supervisor/163.gs.conf 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/163.gs as your nginx config to proxy it.