mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--uds option for binding to Unix domain socket, closes #1388
This commit is contained in:
parent
e0064ba7b0
commit
180c7a5328
6 changed files with 65 additions and 2 deletions
|
|
@ -333,6 +333,10 @@ def uninstall(packages, yes):
|
|||
type=click.IntRange(0, 65535),
|
||||
help="Port for server, defaults to 8001. Use -p 0 to automatically assign an available port.",
|
||||
)
|
||||
@click.option(
|
||||
"--uds",
|
||||
help="Bind to a Unix domain socket",
|
||||
)
|
||||
@click.option(
|
||||
"--reload",
|
||||
is_flag=True,
|
||||
|
|
@ -428,6 +432,7 @@ def serve(
|
|||
immutable,
|
||||
host,
|
||||
port,
|
||||
uds,
|
||||
reload,
|
||||
cors,
|
||||
sqlite_extensions,
|
||||
|
|
@ -569,6 +574,8 @@ def serve(
|
|||
uvicorn_kwargs = dict(
|
||||
host=host, port=port, log_level="info", lifespan="on", workers=1
|
||||
)
|
||||
if uds:
|
||||
uvicorn_kwargs["uds"] = uds
|
||||
if ssl_keyfile:
|
||||
uvicorn_kwargs["ssl_keyfile"] = ssl_keyfile
|
||||
if ssl_certfile:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue