Switched to tornado as the webserver

This commit is contained in:
itsikkes 2016-07-31 20:40:05 +03:00
parent 38f28e4a53
commit 9da2db2c1a
3 changed files with 12 additions and 3 deletions

View File

@ -296,4 +296,11 @@ api.add_resource(NewConfig, '/api/config/new')
api.add_resource(MonkeyDownload, '/api/monkey/download', '/api/monkey/download/', '/api/monkey/download/<string:path>')
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=False, ssl_context=('server.crt', 'server.key'))

View File

@ -3,4 +3,5 @@ Flask-Pymongo
Flask-Restful
python-dateutil
impacket
pycrypto
pycrypto
tornado

View File

@ -3,4 +3,5 @@ Flask-Pymongo
Flask-Restful
python-dateutil
impacket
pycrypto
pycrypto
tornado