mdserver-web/web/app.py

34 lines
1.0 KiB
Python
Raw Permalink Normal View History

2024-10-28 04:06:57 -04:00
# coding=utf-8
2024-10-08 11:35:42 -04:00
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
2024-11-27 11:20:33 -05:00
2024-11-27 12:28:45 -05:00
2024-10-08 11:35:42 -04:00
import sys
2024-11-11 12:06:31 -05:00
import os
2024-10-08 11:35:42 -04:00
2024-11-11 12:06:31 -05:00
from admin import app, socketio
import config
2024-10-08 11:35:42 -04:00
2024-11-23 14:49:53 -05:00
2024-10-08 11:35:42 -04:00
if sys.version_info < (3, 6):
raise RuntimeError('This application must be run under Python 3.6 or later.')
# 我们需要在sys.path中包含根目录以确保我们可以找到在独立运行时运行时所需的一切。
if sys.path[0] != os.path.dirname(os.path.realpath(__file__)):
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
2024-11-27 11:20:33 -05:00
2024-11-28 05:43:49 -05:00
def main():
socketio.run(app,debug=config.DEBUG)
# app.run(debug=True)
2024-11-27 12:40:52 -05:00
2024-11-27 11:20:33 -05:00
if __name__ == '__main__':
main()