def create_api_app(global_conf, **local_conf):
"""Create Main Events Api application.
:param global_conf: Global config
:param local_conf: Local config
:return: falcon.API
"""
controllers = {}
controllers.update({
'/events': v1_events.Events()
})
wsgi_app = falcon.API(
request_type=request.Request
)
for route, ctrl in controllers.items():
wsgi_app.add_route(route, ctrl)
error_handlers.register_error_handler(wsgi_app)
return wsgi_app
评论列表
文章目录