Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/web/app.py

41 lines
1.2 KiB

7 months ago
# coding:utf-8
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
import sys
if sys.version_info < (3, 6):
raise RuntimeError('This application must be run under Python 3.6 or later.')
import os
# 我们需要在sys.path中包含根目录,以确保我们可以找到在独立运行时运行时所需的一切。
if sys.path[0] != os.path.dirname(os.path.realpath(__file__)):
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
# print(sys.path)
7 months ago
import setting
from admin import app, socketio
7 months ago
7 months ago
# print(setting.DEFAULT_SERVER,setting.DEFAULT_SERVER_PORT)
# app = create_app()
7 months ago
def main():
socketio.run(
app,
7 months ago
debug=setting.DEBUG,
7 months ago
allow_unsafe_werkzeug=True,
7 months ago
host=setting.DEFAULT_SERVER,
port=7201,
7 months ago
)
if __name__ == '__main__':
main()