From a6a74fa56cbe1b3285974692801e08aecbc81a08 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 27 Oct 2016 20:52:20 +0200 Subject: [PATCH] Fix all Python files to work with Python2 and Gunicorn/Heroku --- Procfile | 2 +- app.py | 11 ++++++----- controllers/default_controller.py | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Procfile b/Procfile index e2c6366..93f040b 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn api:app --log-file - \ No newline at end of file +web: gunicorn app:app --log-file - \ No newline at end of file diff --git a/app.py b/app.py index 2678bda..9817466 100644 --- a/app.py +++ b/app.py @@ -2,10 +2,11 @@ import connexion +app = connexion.App(__name__, specification_dir='./swagger/') +app.add_api('swagger.yaml', + arguments={ + 'title': 'Rubber Duck Booking Tool' + }) + if __name__ == '__main__': - app = connexion.App(__name__, specification_dir='./swagger/') - app.add_api('swagger.yaml', - arguments={ - 'title': 'Rubber Duck Booking Tool' - }) app.run(port=8080) diff --git a/controllers/default_controller.py b/controllers/default_controller.py index d75e600..ea81210 100644 --- a/controllers/default_controller.py +++ b/controllers/default_controller.py @@ -1,3 +1,2 @@ - -def ducks_get() -> str: +def ducks_get(): return 'do some magic!'