Fix all Python files to work with Python2 and Gunicorn/Heroku
This commit is contained in:
parent
cc17fc634f
commit
a6a74fa56c
2
Procfile
2
Procfile
@ -1 +1 @@
|
|||||||
web: gunicorn api:app --log-file -
|
web: gunicorn app:app --log-file -
|
11
app.py
11
app.py
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
import connexion
|
import connexion
|
||||||
|
|
||||||
|
app = connexion.App(__name__, specification_dir='./swagger/')
|
||||||
|
app.add_api('swagger.yaml',
|
||||||
|
arguments={
|
||||||
|
'title': 'Rubber Duck Booking Tool'
|
||||||
|
})
|
||||||
|
|
||||||
if __name__ == '__main__':
|
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)
|
app.run(port=8080)
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
|
def ducks_get():
|
||||||
def ducks_get() -> str:
|
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
Loading…
Reference in New Issue
Block a user