diff --git a/Procfile b/Procfile index 06a286c80..44b8143bb 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python runserver.py \ No newline at end of file +web: gunicorn runserver:app -w 3 \ No newline at end of file diff --git a/api/db.py b/api/db.py index d2ad14430..9af1758b7 100644 --- a/api/db.py +++ b/api/db.py @@ -17,5 +17,6 @@ from mongoengine import connect from flask.ext.mongoengine import MongoEngine if 'MONGODB_URI' in app.config: - connect(app.config['MONGODB_DB'], host=app.config['MONGODB_URI']) + MONGODB_DB = app.config['MONGODB_URI'].split('/')[-1] + connect(MONGODB_DB, host=app.config['MONGODB_URI']) db = MongoEngine(app)