initial commit

This commit is contained in:
lennyaiko
2025-03-27 11:29:36 +01:00
commit 8e2d371218
35 changed files with 548 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
from flask import Flask
from flask_cors import CORS
from app.config import Config
from app.routes import auth_bp, eligibility_bp
from app.errors import method_not_allowed, unsupported_media_type
def create_app():
"""Factory function to create a Flask app instance"""
app = Flask(__name__)
# Load configuration
app.config.from_object(Config)
CORS(app)
# Register blueprints
app.register_blueprint(auth_bp)
# app.register_blueprint(loan_bp)
app.register_blueprint(eligibility_bp, url_prefix="/eligibility")
# app.register_blueprint(repayment_bp)
# Error Handlers
app.register_error_handler(405, method_not_allowed)
app.register_error_handler(415, unsupported_media_type)
return app