Fix all Python files to work with Python2 and Gunicorn/Heroku

This commit is contained in:
Gergely Polonkai 2016-10-27 20:52:20 +02:00
parent cc17fc634f
commit a6a74fa56c
3 changed files with 8 additions and 8 deletions

View File

@ -1 +1 @@
web: gunicorn api:app --log-file -
web: gunicorn app:app --log-file -

11
app.py
View File

@ -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)

View File

@ -1,3 +1,2 @@
def ducks_get() -> str:
def ducks_get():
return 'do some magic!'