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 -

3
app.py
View File

@ -2,10 +2,11 @@
import connexion import connexion
if __name__ == '__main__':
app = connexion.App(__name__, specification_dir='./swagger/') app = connexion.App(__name__, specification_dir='./swagger/')
app.add_api('swagger.yaml', app.add_api('swagger.yaml',
arguments={ arguments={
'title': 'Rubber Duck Booking Tool' 'title': 'Rubber Duck Booking Tool'
}) })
if __name__ == '__main__':
app.run(port=8080) app.run(port=8080)

View File

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