bluprints, schemas,helpers and routes
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from flask import Flask
|
||||
# from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_marshmallow import Marshmallow
|
||||
from flask_cors import CORS
|
||||
from app.config import Config
|
||||
from app.routes import api
|
||||
|
||||
# Initialize extensions
|
||||
# db = SQLAlchemy()
|
||||
ma = Marshmallow()
|
||||
|
||||
def create_app():
|
||||
""" Factory function to create a Flask app instance """
|
||||
app = Flask(__name__)
|
||||
|
||||
# Load configuration
|
||||
app.config.from_object(Config)
|
||||
|
||||
# Initialize extensions
|
||||
# db.init_app(app)
|
||||
ma.init_app(app)
|
||||
|
||||
|
||||
CORS(app)
|
||||
|
||||
# Register blueprints
|
||||
app.register_blueprint(api, url_prefix="/api")
|
||||
|
||||
return app
|
||||
Reference in New Issue
Block a user