From 358c76c906bc7e7581669258723cba975c2f4879 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 17 Sep 2016 00:02:27 +0200 Subject: [PATCH] Fix heroku port use --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index a3efca8..e4410e8 100644 --- a/app.py +++ b/app.py @@ -1,9 +1,12 @@ from flask import Flask +import os import urllib.request from icalendar.cal import Calendar, Component app = Flask(__name__) +port = int(os.environ.get('PORT', 33507)) + @app.route("/") def hello(): @@ -44,4 +47,4 @@ def hello(): return other.to_ical().replace(b'\r\n', b'\n').strip() if __name__ == "__main__": - app.run() + app.run(port=port)