44 Star 444 Fork 179

水漫门廷 / easy-flask-json-mvc-socketio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
restfulRun.py 607 Bytes
一键复制 编辑 原始数据 按行查看 历史
水漫门廷 提交于 2019-12-19 10:51 . 优化启动方式
'''
@Author: hua
@Date: 2018-08-30 10:52:11
@description:
@LastEditors : hua
@LastEditTime : 2019-12-19 10:17:26
'''
import environment
environment.init("restful")
from app import app
from flask_restful import Api
from flask_cors import CORS
from app.Controllers.RestfulController import TodoList
# https://www.cnblogs.com/franknihao/p/7202253.html uwsgi配置
#https://www.jianshu.com/p/ed1f819a7b58 restful配置
api = Api(app)
api.add_resource(TodoList, '/todos')
app = app
CORS(app, supports_credentials=True)
if __name__ == '__main__':
app.debug = False
app.run(host='0.0.0.0', port=502)
Python
1
https://gitee.com/huashiyuting/flask.git
git@gitee.com:huashiyuting/flask.git
huashiyuting
flask
easy-flask-json-mvc-socketio
master

搜索帮助