Skip to content

Commit 9a18c49

Browse files
committed
feat: support customizing port when running as a module
1 parent 0ba2237 commit 9a18c49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stac_auth_proxy/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"""Entry point for running the module without customized code."""
22

3+
import os
4+
35
import uvicorn
46
from uvicorn.config import LOGGING_CONFIG
57

68
uvicorn.run(
79
f"{__package__}.app:create_app",
810
host="0.0.0.0",
9-
port=8000,
11+
port=int(os.getenv("PORT", 8000)),
1012
log_config={
1113
**LOGGING_CONFIG,
1214
"loggers": {

0 commit comments

Comments
 (0)