From 44d365199f906c17084419d883c28cab6ecb3c4e Mon Sep 17 00:00:00 2001 From: Sorrel Bri Date: Mon, 7 Oct 2019 10:19:48 -0700 Subject: [PATCH] confirm socketio run app --- app.py | 6 ++++-- requirements.txt | 2 ++ server.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 4e9ec07..c0d99e9 100644 --- a/app.py +++ b/app.py @@ -16,8 +16,10 @@ app.config.from_object(DevelopmentConfig) socketio = SocketIO(app) def create_app(): - CORS(app, resources={r"/api/*": {"origins": "http://localhost:3000"}, - r"/auth/*": {"origins": "http://localhost:3000"}}) + CORS(app, resources={ + r"/api/*": {"origins": "http://localhost:3000"}, + r"/auth/*": {"origins": "http://localhost:3000"} + }) db.init_app(app) ma.init_app(app) return app diff --git a/requirements.txt b/requirements.txt index e4a0a43..0af54ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,8 @@ Flask-Script==2.0.6 Flask-SocketIO==4.2.1 Flask-SQLAlchemy==2.4.1 Flask-Testing==0.7.1 +gevent==1.4.0 +greenlet==0.4.15 isort==4.3.21 itsdangerous==1.1.0 Jinja2==2.10.1 diff --git a/server.py b/server.py index d38827c..23b7e45 100644 --- a/server.py +++ b/server.py @@ -1,4 +1,4 @@ -from app import create_app, db +from app import create_app, db, socketio # Blueprints from api.api import api @@ -14,4 +14,4 @@ if __name__ == '__main__': app.register_blueprint(api) app.register_blueprint(auth) migrate = Migrate(app, db) - app.run(port=8000, debug=True) \ No newline at end of file + socketio.run(app) \ No newline at end of file