def run in server.py

This commit is contained in:
Sorrel Bri 2019-10-14 17:20:19 -07:00
parent b4d165e9ff
commit e0942fe459
2 changed files with 13 additions and 3 deletions

View file

@ -1,2 +1,2 @@
web: gunicorn server:app web: gunicorn server:run
release: python manage.py db upgrade release: python manage.py db upgrade

View file

@ -30,3 +30,13 @@ if __name__ == '__main__':
socketio.run(app, debug=False) socketio.run(app, debug=False)
def run:
app = create_app()
register_api_endpoints(app)
app.register_blueprint(server)
migrate = Migrate(app, db)
# added 10/14
DATABASE_URL = os.environ['DATABASE_URL']
conn = psycopg2.connect(DATABASE_URL, sslmode='require')
socketio.run(app, debug=False)