@@ -299,7 +299,7 @@ def apprun(MULTI_PROCESS=True, ip='0.0.0.0', port=5001):
if __name__ == '__main__':
- # app.run(debug=True)
+ app.run()
#server = pywsgi.WSGIServer(('0.0.0.0', 5000), app)
#server.serve_forever()
- apprun()
+ # apprun()
@@ -0,0 +1,14 @@
+import os
+# 日志配置
+# 本地日志存储路径
+log_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logs")
+if not os.path.exists(log_path):
+ os.makedirs(log_path)
+loglevel = "debug"
+accesslog = os.path.join(log_path, 'access.log')
+errorlog = os.path.join(log_path, 'error.log')
+
+workers = 5
+# 设置工作模式为协程
+worker_class = "gevent"
+bind = "0.0.0.0:5001"