pre-push commit
This commit is contained in:
16
battleflow/__init__.py
Normal file
16
battleflow/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from flask import Flask
|
||||
from .config import load_config
|
||||
from .routes.admin import admin_bp
|
||||
from .routes.board import board_bp
|
||||
from .routes.api import api_bp
|
||||
|
||||
def create_app(**overrides) -> Flask:
|
||||
app = Flask(__name__, static_folder="static", template_folder="templates")
|
||||
load_config(app, **overrides)
|
||||
|
||||
# Register blueprints
|
||||
app.register_blueprint(board_bp)
|
||||
app.register_blueprint(admin_bp)
|
||||
app.register_blueprint(api_bp)
|
||||
|
||||
return app
|
||||
Reference in New Issue
Block a user