Last active
August 29, 2015 14:27
-
-
Save cescoferraro/dd5318a2085fb10f5254 to your computer and use it in GitHub Desktop.
FLASK SOCKETIO V1.0 APP FACTORY PROBLEM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
websocket/socket_controllers | |
SAME AS THE EXAMPLE, APART FROM THE OBJECT NAME (CESCO) | |
websocket/__init__.py | |
from flask import Blueprint | |
websocketio = Blueprint('websocket', __name__, url_prefix="/socket") | |
import app.websocket.socket_controllers | |
app/__init__.py | |
CESCO = SocketIO() | |
******inside create_app() | |
from app.websocket import websocketio | |
app.register_blueprint(websocketio) | |
CESCO.init_app(app) | |
manage.py | |
if __name__ == '__main__': | |
CESCO.run(app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment