Fix heroku port use
This commit is contained in:
parent
2afdb2a659
commit
358c76c906
1 changed files with 4 additions and 1 deletions
5
app.py
5
app.py
|
@ -1,9 +1,12 @@
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
import os
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from icalendar.cal import Calendar, Component
|
from icalendar.cal import Calendar, Component
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
port = int(os.environ.get('PORT', 33507))
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello():
|
def hello():
|
||||||
|
@ -44,4 +47,4 @@ def hello():
|
||||||
return other.to_ical().replace(b'\r\n', b'\n').strip()
|
return other.to_ical().replace(b'\r\n', b'\n').strip()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run(port=port)
|
||||||
|
|
Loading…
Reference in a new issue