#coding=utf-8

from flask import Flask
from flask_script import Manager


app = Flask(__name__)

manager = Manager(app)

@app.route("/")
def upload():
    return "hello nihao"

@manager.command
def dev():
    from livereload import Server
    live_server = Server(app.wsgi_app)
    live_server.watch("**/*.*")
    live_server.serve(open_url=True)


if __name__ == "__main__":
    manager.run()

#python main.py dev

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2022-01-03
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-10-19
相关资源
相似解决方案