From 000b825ef08040e0db8f17cdf069216b563c8434 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 25 Nov 2024 02:40:26 +0800 Subject: [PATCH] Delete app.py --- app.py | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 app.py diff --git a/app.py b/app.py deleted file mode 100644 index 685346c77..000000000 --- a/app.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding:utf-8 - -# --------------------------------------------------------------------------------- -# MW-Linux面板 -# --------------------------------------------------------------------------------- -# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved. -# --------------------------------------------------------------------------------- -# Author: midoks -# --------------------------------------------------------------------------------- - -# --------------------------------------------------------------------------------- -# 入口文件 -# --------------------------------------------------------------------------------- - - -# pip install profiler_online -# 性能测试 -# from profiler_online import run_profiler -# run_profiler() -import sys -import io -import os - -sys.dont_write_bytecode = True -from route import app, socketio - - -from gevent.pywsgi import WSGIServer -from geventwebsocket.handler import WebSocketHandler - - -from gevent import monkey -monkey.patch_all() - -try: - if __name__ == "__main__": - - PORT = 7200 - if os.path.exists('data/port.pl'): - f = open('data/port.pl') - PORT = int(f.read()) - f.close() - - # HOST = '0.0.0.0' - # app.run(host=HOST, port=PORT) - - http_server = WSGIServer( - (HOST, PORT), app, handler_class=WebSocketHandler) - http_server.serve_forever() - socketio.run(app, host=HOST, port=PORT) -except Exception as ex: - print(ex)