From e18a19abcc0ba8e5176fe54bdf75895bd60a21ad Mon Sep 17 00:00:00 2001 From: itsikkes Date: Tue, 6 Sep 2016 10:43:38 +0300 Subject: [PATCH] Switched to tornado as webserver, same as in the island --- monkey_business/cc/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/monkey_business/cc/main.py b/monkey_business/cc/main.py index d96f98301..d75d00e6a 100644 --- a/monkey_business/cc/main.py +++ b/monkey_business/cc/main.py @@ -315,4 +315,12 @@ api.add_resource(Connector, '/connector') api.add_resource(JobCreation, '/jobcreate') if __name__ == '__main__': - app.run(host='0.0.0.0', debug=True, ssl_context=('server.crt', 'server.key')) + from tornado.wsgi import WSGIContainer + from tornado.httpserver import HTTPServer + from tornado.ioloop import IOLoop + + http_server = HTTPServer(WSGIContainer(app), ssl_options={'certfile': 'server.crt', 'keyfile': 'server.key'}) + http_server.listen(5000) + IOLoop.instance().start() + + #app.run(host='0.0.0.0', debug=True, ssl_context=('server.crt', 'server.key'))