Skip to content

Commit

Permalink
feat: andere ports/bind ips erlauben
Browse files Browse the repository at this point in the history
  • Loading branch information
danimo committed Sep 10, 2024
1 parent a339b8d commit 63ad229
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,11 @@ def get_pdf():

if __name__ == '__main__':
try:
host= os.getenv("FLASK_RUN_HOST", "0.0.0.0")
port = os.getenv("FLASK_RUN_PORT", 5000)
app.run(debug=True, host="0.0.0.0", port=port)
app.run(debug=True, host=host, port=port)
except:
print(f"Coud not bind to port {port}, set FLASK_RUN_PORT.")
print(f"Coud not bind to host {host}:{port}, set FLASK_RUN_HOST and/or FLASK_RUN_PORT.")


# PV Forecast:
Expand Down

0 comments on commit 63ad229

Please sign in to comment.