def front(port, working_dir, redis_host):
"""start the frontend server"""
import eventlet
eventlet.monkey_patch() # for flask_socketio message queue support
from flask_socketio import SocketIO
static = os.path.abspath(os.path.join(working_dir, 'static'))
templs = os.path.abspath(os.path.join(working_dir, 'templates'))
app = front_app(static_folder=static, template_folder=templs)
socketio = SocketIO(app, message_queue=redis_host)
socketio.run(app, host='0.0.0.0', port=port) # doesn't seem to work if debug=True
评论列表
文章目录