20 lines
453 B
Python
20 lines
453 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import annotations
|
|
|
|
from flask import Flask
|
|
|
|
from app.config import Config
|
|
from app.db import init_db, seed_if_empty
|
|
from app.routes import register_routes
|
|
|
|
|
|
def create_app() -> Flask:
|
|
app = Flask(__name__, template_folder="templates", static_folder="static")
|
|
app.config.from_object(Config)
|
|
app.secret_key = Config.SECRET_KEY
|
|
|
|
init_db()
|
|
seed_if_empty()
|
|
register_routes(app)
|
|
return app
|