Skip to content

Commit 1df426a

Browse files
committed
More doc updates for FLASK_APP
1 parent a7d829c commit 1df426a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/server.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ The :command:`flask` command line script (:ref:`cli`) is strongly recommended fo
1616
development because it provides a superior reload experience due to how it
1717
loads the application. The basic usage is like this::
1818

19-
$ flask -a my_application --debug run
19+
$ export FLASK_APP=my_application
20+
$ export FLASK_DEBUG=1
21+
$ flask run
2022

2123
This will enable the debugger, the reloader and then start the server on
2224
*http://localhost:5000/*.
@@ -25,7 +27,7 @@ The individual features of the server can be controlled by passing more
2527
arguments to the ``run`` option. For instance the reloader can be
2628
disabled::
2729

28-
$ flask -a my_application --debug run --no-reload
30+
$ flask run --no-reload
2931

3032
In Code
3133
-------
@@ -40,11 +42,11 @@ Example::
4042
app.run()
4143

4244
This works well for the common case but it does not work well for
43-
development which is why from Flask 1.0 onwards the :command:`flask` method is
44-
recommended. The reason for this is that due to how the reload mechanism
45-
works there are some bizarre side-effects (like executing certain code
46-
twice, sometimes crashing without message or dying when a syntax or
47-
import error happens).
45+
development which is why from Flask 0.11 onwards the :command:`flask`
46+
method is recommended. The reason for this is that due to how the reload
47+
mechanism works there are some bizarre side-effects (like executing
48+
certain code twice, sometimes crashing without message or dying when a
49+
syntax or import error happens).
4850

4951
It is however still a perfectly valid method for invoking a non automatic
5052
reloading application.

0 commit comments

Comments
 (0)