Spaces:
Runtime error
Runtime error
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from flask_bcrypt import Bcrypt | |
from flask_jwt_extended import JWTManager | |
db = SQLAlchemy() | |
bcrypt = Bcrypt() | |
jwt = JWTManager() | |
def create_app(): | |
app = Flask(__name__) | |
app.config.from_object('app.config.Config') | |
db.init_app(app) | |
bcrypt.init_app(app) | |
jwt.init_app(app) | |
from app.routes import auth, chat, admin, profile | |
app.register_blueprint(auth.bp) | |
app.register_blueprint(chat.bp) | |
app.register_blueprint(admin.bp) | |
app.register_blueprint(profile.bp) | |
return app |