Exemplo n.º 1
0
Arquivo: api.py Projeto: OdayWu/chiki
# coding: utf-8

try:
    from simple import create_api
    app = create_api()
except Exception, e:
    from chiki import start_error    
    from simple.config import APIConfig
    start_error(config=APIConfig)
Exemplo n.º 2
0
# coding: utf-8

try:
    from simple import create_api
    app = create_api()
except Exception, e:
    from chiki import start_error
    from simple.config import APIConfig
    start_error(config=APIConfig)
Exemplo n.º 3
0
def api(debug=False, reloader=False, host='0.0.0.0', port=APIConfig.PORT):
    """ Run the api server. """
    app = create_api()
    app.run(debug=debug, use_reloader=reloader, host=host, port=port)