Skip to content

Commit 6bf42f9

Browse files
committed
Merge pull request pallets#1577 from sprin/1102_warn_on_run
docs: run() should not be used in production
2 parents 0030f63 + 6e91498 commit 6bf42f9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

flask/app.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,13 @@ def make_shell_context(self):
779779
return rv
780780

781781
def run(self, host=None, port=None, debug=None, **options):
782-
"""Runs the application on a local development server. If the
783-
:attr:`debug` flag is set the server will automatically reload
782+
"""Runs the application on a local development server.
783+
784+
Do not use ``run()`` in a production setting. It is not intended to
785+
meet security and performance requirements for a production server.
786+
Instead, see :ref:`deployment` for WSGI server recommendations.
787+
788+
If the :attr:`debug` flag is set the server will automatically reload
784789
for code changes and show a debugger in case an exception happened.
785790
786791
If you want to run the application in debug mode, but disable the

0 commit comments

Comments
 (0)