app.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:Andy-Chat 作者: andriy-sa 项目源码 文件源码
def create_app():
    app.config.from_object(development)

    db.init_app(app)

    bcrypt.init_app(app)

    from views.auth import auth_view
    from views.users import user_view
    from views.chat import chat_view
    from models.user import authenticate, identity

    jwt.identity_handler(identity)
    jwt.authentication_handler(authenticate)
    jwt.init_app(app)

    # Register Routes
    app.register_blueprint(auth_view, url_prefix='/api')
    app.register_blueprint(user_view, url_prefix='/api')
    app.register_blueprint(chat_view, url_prefix='/api')

    return app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号