예제 #1
0
"""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'])
예제 #2
0
파일: db_create.py 프로젝트: Daan4/qldf
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()