Skip to content

Commit

Permalink
Make the --bind option optional (#10)
Browse files Browse the repository at this point in the history
PBENCH-1258
  • Loading branch information
webbnh authored Aug 30, 2023
1 parent 9655b23 commit b4784f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/relay/relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ def delete_file(context: click.Context, file_id: str) -> HTTPResponse:
return HTTPResponse(status=HTTPStatus.OK, body="Success")


@click.command()
@click.command(
epilog="See https://github.com/distributed-system-analysis/file-relay#file-relay for more information."
)
@click.option(
"--server_id",
prompt=True,
Expand All @@ -306,7 +308,6 @@ def delete_file(context: click.Context, file_id: str) -> HTTPResponse:
)
@click.option(
"--bind",
prompt=True,
required=True,
default=DEFAULT_ADDRESS + ":" + str(DEFAULT_PORT),
show_default=True,
Expand All @@ -328,7 +329,9 @@ def delete_file(context: click.Context, file_id: str) -> HTTPResponse:
)
@click.pass_context
def main(context, server_id, bind, files_directory, debug) -> None:
"""The main function for the relay micro-server
"""An ad-hoc web server with a simple RESTful interface for transferring files between two clients
\f
The main function for the `relay` micro-server
Using the Click support, we parse the command line, extract the
configuration information, store some of it in the Click context, and start
Expand Down

0 comments on commit b4784f8

Please sign in to comment.