Example #1
0
File: api.py Project: 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)
Example #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)
Example #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)