Skip to content

Commit 8e780bb

Browse files
committed
[#90109] Add startup information
1 parent 36c7b8a commit 8e780bb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

protoplaster/conf/consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
ARTIFACTS_DIR = "/var/lib/protoplaster/artifacts"
44
LOCAL_DEVICE_NAME = "Local device"
55
WEBUI_POLLING_INTERVAL = 1 # seconds
6+
SERVE_IP = "0.0.0.0"

protoplaster/protoplaster.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
import protoplaster.api.v1
1212
import protoplaster.webui
1313
import protoplaster.webui.devices
14-
from protoplaster.conf.consts import CONFIG_DIR, ARTIFACTS_DIR, REPORTS_DIR, LOCAL_DEVICE_NAME
14+
from protoplaster.conf.consts import CONFIG_DIR, ARTIFACTS_DIR, REPORTS_DIR, LOCAL_DEVICE_NAME, SERVE_IP
1515
from protoplaster.runner.manager import RunManager
1616
from protoplaster.runner.runner import list_tests, list_test_suites, run_tests
1717
from protoplaster.report_generators.system_report.protoplaster_system_report import __file__ as system_report_file
18-
from protoplaster.tools.tools import error
18+
from protoplaster.tools.tools import error, info
1919

2020

2121
def create_docs_app() -> Flask:
@@ -136,7 +136,10 @@ def run_server(args):
136136
app.register_blueprint(protoplaster.api.v1.create_routes())
137137
app.register_blueprint(protoplaster.webui.webui_blueprint)
138138

139-
serve(app, host="0.0.0.0", port=int(args.port))
139+
print(
140+
info(f"Protoplaster server running on http://{SERVE_IP}:{args.port}"))
141+
142+
serve(app, host=SERVE_IP, port=int(args.port))
140143

141144

142145
def main():

0 commit comments

Comments
 (0)