3 Star 0 Fork 0

yanyi_123456 / YY_RMS_Multiple_Manage_4.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.py 947 Bytes
一键复制 编辑 原始数据 按行查看 历史
apan 提交于 2022-07-28 14:24 . 修改文件调用
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Date:2022/07/18 15:00:54
'''
import sys
sys.path.append(".")
from config.server import create_app
from Common.exception_base import APIException
from config.SystemConfig import SystemConfig
app = create_app()
@app.errorhandler(Exception)
def framework_error(e):
# 1、APIException
# 2、Exception
if isinstance(e, APIException):
return e
else:
if not app.config['DEBUG']:
return APIException(msg="系统异常错误: {}".format(e))
else:
return e
def main():
HOST = SystemConfig.getConfig("serverip")
PORT = int(SystemConfig.getConfig("port"))
# CORS(app)
# HOST = '127.0.0.1'
# PORT = 8080
app.run(host=HOST, port=PORT, debug=True)
if __name__ == '__main__':
try:
import sys
sys.exit(main())
except Exception as error:
import traceback
traceback.print_exc()
Python
1
https://gitee.com/yanyi_123456/yy_-rms_-multiple_-manage_4.0.git
git@gitee.com:yanyi_123456/yy_-rms_-multiple_-manage_4.0.git
yanyi_123456
yy_-rms_-multiple_-manage_4.0
YY_RMS_Multiple_Manage_4.0
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891