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 -
|
7
app.py
7
app.py
@ -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)
|
||||||
|
@ -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