Skip to content

Commit ac3fb5d

Browse files
committed
Added port configuration from environment variable
1 parent 48e7940 commit ac3fb5d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/tdamapper/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
from dataclasses import asdict, dataclass
34

45
import pandas as pd
@@ -588,7 +589,8 @@ def main_page():
588589

589590

590591
def main():
591-
ui.run(storage_secret="secret", title="tda-mapper-app", favicon=ICON_URL)
592+
port = os.getenv("PORT", "8080")
593+
ui.run(storage_secret="secret", title="tda-mapper-app", favicon=ICON_URL, port=port)
592594

593595

594596
if __name__ in ["__main__", "__mp_main__", "tdamapper.app"]:

0 commit comments

Comments
 (0)