Load .env file manually because socketio.run does not load it for you.

This commit is contained in:
Patrick Jentsch 2019-08-22 14:20:54 +02:00
parent a5f1336847
commit a44407255b

View File

@ -1,8 +1,13 @@
from app import create_app, db, socketio
from app.models import Corpus, User, Role, Permission, Job
from dotenv import load_dotenv
from flask_migrate import Migrate
import os
load_dotenv()
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
migrate = Migrate(app, db)