docs: :command:pip, :option:--debug
This commit is contained in:
parent
936e787cca
commit
02694d609f
14 changed files with 50 additions and 50 deletions
|
|
@ -6,19 +6,19 @@ Development Server
|
|||
.. currentmodule:: flask
|
||||
|
||||
Starting with Flask 1.0 there are multiple built-in ways to run a
|
||||
development server. The best one is the ``flask`` command line utility
|
||||
development server. The best one is the :command:`flask` command line utility
|
||||
but you can also continue using the :meth:`Flask.run` method.
|
||||
|
||||
Command Line
|
||||
------------
|
||||
|
||||
The ``flask`` command line script (:ref:`cli`) is strongly recommende for
|
||||
The :command:`flask` command line script (:ref:`cli`) is strongly recommende for
|
||||
development because it provides a superior reload experience due to how it
|
||||
loads the application. The basic usage is like this::
|
||||
|
||||
$ flask -a my_application --debug run
|
||||
|
||||
This will enable the debugger, the reloader and then start the server on
|
||||
This will enable the debugger, the reloader and then start the server on
|
||||
*http://localhost:5000/*.
|
||||
|
||||
The individual features of the server can be controlled by passing more
|
||||
|
|
@ -32,7 +32,7 @@ In Code
|
|||
|
||||
The alternative way to start the application is through the
|
||||
:meth:`Flask.run` method. This will immediately launch a local server
|
||||
exactly the same way the ``flask`` script does.
|
||||
exactly the same way the :command:`flask` script does.
|
||||
|
||||
Example::
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ Example::
|
|||
app.run()
|
||||
|
||||
This works well for the common case but it does not work well for
|
||||
development which is why from Flask 1.0 onwards the ``flask`` method is
|
||||
development which is why from Flask 1.0 onwards the :command:`flask` method is
|
||||
recommended. The reason for this is that due to how the reload mechanism
|
||||
works there are some bizarre side-effects (like executing certain code
|
||||
twice, sometimes crashing without message or dying when a syntax or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue