Skip to content
Permalink
Browse files

view: Add a --port option to listen on an alternate port

The default port 4000 may not always be available.  Requested by Trevor.
  • Loading branch information...
tsibley committed Mar 26, 2019
1 parent fa29e64 commit 1c735c2b81078c5bb2ba8a6561d6ea5ea59fdb36
Showing with 8 additions and 1 deletion.
  1. +8 −1 nextstrain/cli/command/view.py
@@ -35,6 +35,13 @@ def register_parser(subparser):
help = "Allow other computers on the network to access the website",
action = "store_true")

parser.add_argument(
"--port",
help = "Listen on the given port instead of the default port %(default)s",
metavar = "<number>",
type = int,
default = 4000)

# Positional parameters
parser.add_argument(
"directory",
@@ -79,7 +86,7 @@ def run(opts):
# interface for ports/environment when we have concrete requirements.
# -trs, 27 June 2018
host = "0.0.0.0" if opts.allow_remote_access else "127.0.0.1"
port = 4000
port = opts.port

opts.docker_args = [
*opts.docker_args,

0 comments on commit 1c735c2

Please sign in to comment.
You can’t perform that action at this time.