Skip to content

Commit

Permalink
Documentation for --port=0
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 22, 2019
1 parent 85c19c4 commit ceef5ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion datasette/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ def package(
"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(
"--debug", is_flag=True, help="Enable debug mode - useful for development"
)
Expand Down
3 changes: 2 additions & 1 deletion docs/datasette-serve-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Options:
connections from the local machine will be allowed. Use
0.0.0.0 to listen to all IPs and allow access from other
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
--reload Automatically reload if database or code change detected -
useful for development
Expand Down

0 comments on commit ceef5ce

Please sign in to comment.