def setup_server(): # Config tornado.curl_httpclient to use NullHandler tornado_logger = logging.getLogger('tornado.curl_httpclient') tornado_logger.addHandler(logging.NullHandler()) tornado_logger.propagate = False settings = dict( autoreload=True, secret="ElasticKube", ) configure(settings) handlers = [ (r"/api/v1/auth/providers", AuthProvidersHandler), (r"/api/v1/auth/signup", SignupHandler), (r"/api/v1/auth/login", PasswordHandler), (r"/api/v1/auth/google", GoogleOAuth2LoginHandler), (r"/api/v1/ws", MainWebSocketHandler), (r"/icons/(?P<entity_id>[^\/]+)\/(?P<chart_id>[^\/]+)", IconGenerator) ] application = Application(handlers, **settings) server = HTTPServer(application) socket = bind_unix_socket("/var/run/elastickube-api.sock", mode=0777) server.add_socket(socket) IOLoop.current().add_callback(initialize, settings)
def setup_server(): tornado_logger = logging.getLogger('tornado.curl_httpclient') tornado_logger.addHandler(logging.NullHandler()) tornado_logger.propagate = False settings = dict(secret='abcde12345') configure(settings) IOLoop.current().add_future(initialize(settings), start_server)
def setup_server(): # Config tornado.curl_httpclient to use NullHandler tornado_logger = logging.getLogger('tornado.curl_httpclient') tornado_logger.addHandler(logging.NullHandler()) tornado_logger.propagate = False settings = dict( autoreload=True, secret="ElasticKube", ) configure(settings) IOLoop.current().add_future(initialize(settings), start_server)