コード例 #1
0
ファイル: api.py プロジェクト: 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)
コード例 #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)
コード例 #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)