Skip to content

Commit

Permalink
REFACTOR: NAV-150 - Use pathlib instead of os.
Browse files Browse the repository at this point in the history
  • Loading branch information
clukas1 committed Aug 22, 2024
1 parent d30a055 commit 9a73738
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public_transit_viewer/entrypoint.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import os
from pathlib import Path
import subprocess

SERVER_ADDRESS = "0.0.0.0"
SERVER_PORT = 8501


def main():
script_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
main_py_path = os.path.join(script_dir, "public_transit_viewer", "main.py")
root_dir = Path(__file__).resolve().parent.parent
main_py_path = root_dir / "public_transit_viewer" / "main.py"

subprocess.run(
[
"streamlit",
"run",
main_py_path,
str(main_py_path),
f"--server.port={SERVER_PORT}",
f"--server.address={SERVER_ADDRESS}",
"--browser.gatherUsageStats=false",
],
cwd=script_dir,
cwd=root_dir,
)


Expand Down

0 comments on commit 9a73738

Please sign in to comment.