Documentation for --port=0

This commit is contained in:
Simon Willison 2019-12-22 15:42:30 +00:00
commit ceef5ce684
2 changed files with 8 additions and 2 deletions

View file

@ -239,7 +239,12 @@ def package(
"all IPs and allow access from other machines." "all IPs and allow access from other machines."
), ),
) )
@click.option("-p", "--port", default=8001, help="Port for server, defaults to 8001") @click.option(
"-p",
"--port",
default=8001,
help="Port for server, defaults to 8001. Use -p 0 to automatically assign an available port.",
)
@click.option( @click.option(
"--debug", is_flag=True, help="Enable debug mode - useful for development" "--debug", is_flag=True, help="Enable debug mode - useful for development"
) )

View file

@ -10,7 +10,8 @@ Options:
connections from the local machine will be allowed. Use connections from the local machine will be allowed. Use
0.0.0.0 to listen to all IPs and allow access from other 0.0.0.0 to listen to all IPs and allow access from other
machines. machines.
-p, --port INTEGER Port for server, defaults to 8001 -p, --port INTEGER Port for server, defaults to 8001. Use -p 0 to automatically
assign an available port.
--debug Enable debug mode - useful for development --debug Enable debug mode - useful for development
--reload Automatically reload if database or code change detected - --reload Automatically reload if database or code change detected -
useful for development useful for development