Skip to content

Commit 6e91498

Browse files
sprinsprin
authored and
sprin
committed
docs: run() should not be used in production
Refs pallets#1102
1 parent 1ac4156 commit 6e91498

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
@@ -770,8 +770,13 @@ def make_shell_context(self):
770770
return rv
771771

772772
def run(self, host=None, port=None, debug=None, **options):
773-
"""Runs the application on a local development server. If the
774-
:attr:`debug` flag is set the server will automatically reload
773+
"""Runs the application on a local development server.
774+
775+
Do not use ``run()`` in a production setting. It is not intended to
776+
meet security and performance requirements for a production server.
777+
Instead, see :ref:`deployment` for WSGI server recommendations.
778+
779+
If the :attr:`debug` flag is set the server will automatically reload
775780
for code changes and show a debugger in case an exception happened.
776781
777782
If you want to run the application in debug mode, but disable the

0 commit comments

Comments
 (0)