Skip to content

Commit

Permalink
Fixed main script breaking if no SITE_PORT env-var present (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
margeobur authored Mar 19, 2020
1 parent 3a9dd3c commit 3ac0359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
CREATE_TEST_DATA = True

LISTEN_IP = "0.0.0.0"
LISTEN_PORT = int(os.getenv("SITE_PORT"))
LISTEN_PORT = os.getenv("SITE_PORT")
if LISTEN_PORT is None:
LISTEN_PORT = 1234
else:
LISTEN_PORT = int(LISTEN_PORT)

SITE_ROOT = os.getenv("SITE_ROOT")
if SITE_ROOT is None:
# if no environment variable has been set, we will assume the server is being used in development
Expand Down

0 comments on commit 3ac0359

Please sign in to comment.