Exemplo n.º 1
0
def initdb():
    config_app(app, 'development')
    try:
        # db.drop_all()
        db.create_all()
        print('Create tables success')
    except Exception as e:
        print('Create tables fail:', e)
        sys.exit(0)
Exemplo n.º 2
0
def runserver(host, port):
    config_app(app, 'development')
    dispatch_handlers(app)
    dispatch_apps(app)
    # print(app.url_map)
    app.run(host=host, port=port)
Exemplo n.º 3
0
def runserver():
    config_app(app, 'development')
    dispatch_handlers(app)
    dispatch_apps(app)
    print(app.url_map)
    app.run(host='0.0.0.0')