ksyasuda af0d958b89
All checks were successful
Build Docker Image / build (push) Successful in 12m54s
update code structure and get session on each query
2025-02-09 20:20:10 -08:00

20 lines
368 B
Python

from flask import Flask
from app.config import Config
from app.database import engine
from app.models import Base
from app.views import bp
def create_app():
app = Flask(__name__)
app.config.from_object(Config)
# Ensure database tables exist
Base.metadata.create_all(engine)
# Register blueprints
app.register_blueprint(bp)
return app