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)
def runserver(host, port): config_app(app, 'development') dispatch_handlers(app) dispatch_apps(app) # print(app.url_map) app.run(host=host, port=port)
def runserver(): config_app(app, 'development') dispatch_handlers(app) dispatch_apps(app) print(app.url_map) app.run(host='0.0.0.0')