Skip to content

Commit 3b3cc8a

Browse files
committed
add PORT env override
1 parent 5fefca5 commit 3b3cc8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

teufa/cli.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23

34
import click
@@ -14,8 +15,9 @@ def cli():
1415
@cli.command()
1516
@click.option("--dev/--no-dev", default=False)
1617
def server(dev):
18+
port = os.environ.get("PORT", 8000)
1719
cfg = {
18-
"bind": "127.0.0.1:8000",
20+
"bind": f"0.0.0.0:{port}",
1921
"reload": dev,
2022
}
2123
teufa.server.Application(cfg).run()

0 commit comments

Comments
 (0)