ki-backend/app.py

19 lines
514 B
Python
Raw Normal View History

2021-06-06 22:25:10 +02:00
import os
from dotenv import load_dotenv, find_dotenv
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
load_dotenv(find_dotenv())
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv("SQLALCHEMY_DATABASE_URI")
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config["KI_DATA_DIR"] = os.path.dirname(__file__) + "/data"
2021-06-12 13:24:26 +02:00
app.config["KI_AUTH"] = os.getenv("KI_AUTH")
2021-06-06 22:25:10 +02:00
db = SQLAlchemy(app)
migrate = Migrate(app, db)
from ki import module