Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to configure the webserver port #1858

Merged
merged 4 commits into from
Nov 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a port option to the webserver command
  • Loading branch information
ThomasLaPiana committed Nov 28, 2022
commit 92df112298c202f7177da2c41ef4d6412f405761
7 changes: 4 additions & 3 deletions src/fides/cli/commands/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ def status(ctx: click.Context) -> None:

@click.command()
@click.pass_context
def webserver(ctx: click.Context) -> None:
@click.option("--port", "-p", type=int, default=8080)
def webserver(ctx: click.Context, port: int=8080) -> None:
"""
Starts the fides API server using Uvicorn on port 8080.
Starts the fides API server using Uvicorn.
"""
# This has to be here to avoid a circular dependency
from fides.api.main import start_webserver

start_webserver()
start_webserver(port=port)


@click.command()
Expand Down