#!/usr/bin/env python
# -*- coding: utf-8 -*-

#patch all
import gevent.monkey
gevent.monkey.patch_all()
	

import sys
import os

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)

try:
    sys.path.remove(os.path.dirname(os.path.abspath(__file__)))    
except ValueError:
    pass
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

import gluon.main
application = gluon.main.wsgibase


#gevent server
from gevent import pywsgi
from gevent.pool import Pool
pywsgi.WSGIServer(('', 8000), application, log=None, spawn=Pool(96)).serve_forever()

