This repository has been archived on 2026-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2022-03-26 08:02:25 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
# -- coding:utf-8 --
|
|
|
|
|
# @Author: markushammered@gmail.com
|
|
|
|
|
# @Development Tool: PyCharm
|
|
|
|
|
# @Create Time: 2022/3/25
|
|
|
|
|
# @File Name: manage.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from app import create_app
|
|
|
|
|
|
2022-03-26 08:41:15 +08:00
|
|
|
app = create_app('default')
|
2022-03-26 09:12:12 +08:00
|
|
|
|
2022-03-26 08:02:25 +08:00
|
|
|
if __name__ == '__main__':
|
2022-04-02 18:03:25 +08:00
|
|
|
from gevent import pywsgi
|
|
|
|
|
|
2022-03-26 08:41:15 +08:00
|
|
|
print('服务运行在 http://127.0.0.1:5000')
|
|
|
|
|
try:
|
|
|
|
|
server = pywsgi.WSGIServer(('0.0.0.0', 5000), app)
|
|
|
|
|
server.serve_forever()
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
print('已退出')
|
|
|
|
|
except OSError:
|
|
|
|
|
print('5000 端口已被占用')
|