[add]: refactor/clean up
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from flask import Flask
|
||||
import os
|
||||
from app.extensions import db, migrate
|
||||
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
# Load configuration from config.py
|
||||
app.config.from_object('app.config')
|
||||
|
||||
# Initialize extensions
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db)
|
||||
|
||||
# Register blueprints or CLI commands here if needed
|
||||
from app.api.commands import commands
|
||||
app.cli.add_command(commands.upload_xls_cli)
|
||||
|
||||
return app
|
||||
Reference in New Issue
Block a user