"""Run the app locally.""" from qldf import create_app import os config = os.environ.get('QLDF_CONFIG', 'config.config') app = create_app(config) if __name__ == '__main__': app.logger.info('running qldf...') app.run(debug=app.config['DEBUG'], use_reloader=app.config['USE_RELOADER'], host=app.config['HOST'], port=app.config['PORT'])
import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from qldf import db, create_app app = create_app('config.scripts_config') with app.app_context(): db.create_all() db.session.commit()