19 lines
367 B
Python
19 lines
367 B
Python
from flask import Flask
|
|
|
|
from .db import init_db
|
|
|
|
|
|
def create_app() -> Flask:
|
|
app = Flask(__name__, instance_relative_config=True)
|
|
|
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///app.db"
|
|
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
|
|
|
|
init_db(app)
|
|
|
|
from .routes import bp # noqa: PLC0415
|
|
|
|
app.register_blueprint(bp)
|
|
|
|
return app
|