Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
def dev():
    from  livereload import Server
    live_server = Server(app.wsgi_app)
    live_server.watch('**/*.*')
    live_server.serve(open_url=True)
Exemple #5
0
def dev():  # 执行 python Sample.py dev   更新文件时,会自动重启服务器
    from livereload import Server
    live_server = Server(app)
    live_server.watch('**/*.*')
    live_server.serve()
Exemple #6
0
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")
Exemple #8
0
def live(port=8099):
    from livereload import Server
    server = Server(manager.create_app())
    server.serve(port)
Exemple #9
0
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)
Exemple #10
0
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)
Exemple #11
0
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)