cube-studio/myapp/run.py
2023-12-11 13:25:07 +08:00

26 lines
700 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from myapp import app
app.run(host="0.0.0.0", port=80, debug=True)
# from myapp import socketio
# socketio.run(app,host="0.0.0.0", port=80, debug=True)
# from gevent import pywsgi
# from geventwebsocket.handler import WebSocketHandler
# server = pywsgi.WSGIServer(('0.0.0.0', 80), app, handler_class=WebSocketHandler)
# server.serve_forever()
# #配置websocket
# from geventwebsocket.handler import WebSocketHandler
# from gevent.pywsgi import WSGIServer
# app.debug=True
# # 如果是http请求走app使用原有的wsgi处理如果是websocket请求走WebSocketHandler处理
# http_server = WSGIServer(('0.0.0.0',80), app, handler_class=WebSocketHandler)
# http_server.serve_forever()