def live(): print("in live function") from livereload import Server server = Server(app.wsgi_app) server.watch("static/css/*.*") server.watch("templates/*/*.*") server.serve(open_url_delay=True, port=8080)
def live(port=5000): from livereload import Server server = Server(manager.create_app()) server.watch('assets/*.js', 'make -C assets build') server.watch('assets/page/*.js', 'make -C assets build') server.watch('assets/stylus', 'make -C assets stylus') server.serve(port)
def dev(): from livereload import Server live_server = Server(app.wsgi_app) live_server.watch('**/*.*') live_server.serve(open_url=True)
def dev(): # 执行 python Sample.py dev 更新文件时,会自动重启服务器 from livereload import Server live_server = Server(app) live_server.watch('**/*.*') live_server.serve()
def live(port=5000): from livereload import Server server = Server(manager.create_app()) server.serve(port)
def liveserver(port=8001): from livereload import Server server = Server(app.wsgi_app) server.watch('app/static/public/css') server.watch('app/static/public/js/**') server.serve(port=port, host="0.0.0.0")
def live(port=8099): from livereload import Server server = Server(manager.create_app()) server.serve(port)
def dev(): '''Runs the Flask development server i.e. app.run() when all files changed''' from livereload import Server live_server = Server(app.wsgi_app) live_server.watch('**/*') live_server.serve(open_url_delay=True, debug=True, port=80)
def dev(): """for automatically refreshing web page when something changes""" from livereload import Server live_server = Server(app.wsgi_app) live_server.watch('app') live_server.serve(open_url_delay=True)