Skip to content

Commit c5e9e0c

Browse files
committed
dev server warning
1 parent 7814009 commit c5e9e0c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dash/dash.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,9 @@ def verify_url_part(served_part, url_part, part_name):
15991599
else:
16001600
display_url = (protocol, host, ":{}".format(port), path)
16011601

1602-
self.logger.info("Running on %s://%s%s%s", *display_url)
1602+
self.logger.info("Dash is running on %s://%s%s%s\n", *display_url)
1603+
self.logger.info(" Warning: This is a development server. Do not use app.run_server")
1604+
self.logger.info(" in production, use a production WSGI server like gunicorn instead.\n")
16031605

16041606
if not os.environ.get("FLASK_ENV"):
16051607
os.environ["FLASK_ENV"] = "development"

tests/unit/test_configs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def test_no_proxy_success(mocker, caplog, empty_environ):
264264

265265
app.run_server(port=8787)
266266

267-
assert "Running on http://127.0.0.1:8787/\n" in caplog.text
267+
assert "Dash is running on http://127.0.0.1:8787/\n" in caplog.text
268268

269269

270270
@pytest.mark.parametrize(
@@ -284,7 +284,7 @@ def test_proxy_success(mocker, caplog, empty_environ, proxy, host, port, path):
284284

285285
app.run_server(proxy=proxystr, host=host, port=port)
286286

287-
assert "Running on {}{}\n".format(proxy, path) in caplog.text
287+
assert "Dash is running on {}{}\n".format(proxy, path) in caplog.text
288288

289289

290290
def test_proxy_failure(mocker, empty_environ):

0 commit comments

Comments
 (0)