1 Star 0 Fork 0

GooooodMorning/flask-k8s

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
manage.py 646 Bytes
一键复制 编辑 原始数据 按行查看 历史
cmlfxz 提交于 2020-08-28 23:41 . mod 集群切换bug
from flask_script import Manager,Server,Shell
from flask_migrate import Migrate
from flask_migrate import MigrateCommand
from flask_k8s import create_app
# from flask_k8s import models
app = create_app()
manager = Manager(app)
# migrate = Migrate(app,models.db)
#python manager.py server 取代runserver
#黑科技段
# def make_shell_context():
# return dict(app=app, db=models.db, Cluster=models.Cluster)
# manager.add_command("shell", Shell(make_context=make_shell_context))
#
manager.add_command("server", Server(host='0.0.0.0', port=8082))
# manager.add_command("db", MigrateCommand)
if __name__ == "__main__":
manager.run()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/goooood/flask-k8s.git
git@gitee.com:goooood/flask-k8s.git
goooood
flask-k8s
flask-k8s
master

搜索帮助