Preserve functionality to run locally.

On the server the app is now run by gunicorn.
This commit is contained in:
Kevin Dungs 2014-11-17 15:42:06 +01:00
parent 2abcf46b30
commit eed50f8ac6
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
web: python ./app.py web: gunicorn app --log-file -

5
app.py
View File

@ -24,5 +24,6 @@ def showMap(threewords):
if __name__ == '__main__': if __name__ == '__main__':
import os run(host='localhost', port=8080)
run(host='0.0.0.0', port=int(os.environ.get("PORT", 5000)))
app = bottle.default_app()