Skip to content

Commit

Permalink
chore: add port startup argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaisberg authored and dreulavelle committed Sep 24, 2024
1 parent 7cc491d commit f5388a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def signal_handler(signum, frame):
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)

config = uvicorn.Config(app, host="0.0.0.0", port=8080, log_config=None)
config = uvicorn.Config(app, host="0.0.0.0", port=args.port, log_config=None)
server = Server(config=config)

with server.run_in_thread():
Expand Down
6 changes: 6 additions & 0 deletions src/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def handle_args():
action="store_true",
help="Start a Plex listener.",
)
parser.add_argument(
"-p", "--port",
type=int,
default=8080,
help='Port to run the server on (default: 8000)'
)

args = parser.parse_args()

Expand Down

0 comments on commit f5388a6

Please sign in to comment.