Skip to content

Commit b4a1431

Browse files
committed
Add config to port to work on heroku
1 parent e683476 commit b4a1431

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,7 @@ def post(self):
5555

5656
word_list_view = WordListView.as_view("word_list_view")
5757
app.add_url_rule("/", view_func=word_list_view, methods=["POST"])
58+
5859
if __name__ == "__main__":
59-
app.run(host="127.0.0.1", port="5000", debug=True)
60+
port = int(os.environ.get("PORT", 5000))
61+
app.run(host='0.0.0.0', port=port)

0 commit comments

Comments
 (0)