@@ -16,7 +16,9 @@ The :command:`flask` command line script (:ref:`cli`) is strongly recommended fo
16
16
development because it provides a superior reload experience due to how it
17
17
loads the application. The basic usage is like this::
18
18
19
- $ flask -a my_application --debug run
19
+ $ export FLASK_APP=my_application
20
+ $ export FLASK_DEBUG=1
21
+ $ flask run
20
22
21
23
This will enable the debugger, the reloader and then start the server on
22
24
*http://localhost:5000/ *.
@@ -25,7 +27,7 @@ The individual features of the server can be controlled by passing more
25
27
arguments to the ``run `` option. For instance the reloader can be
26
28
disabled::
27
29
28
- $ flask -a my_application --debug run --no-reload
30
+ $ flask run --no-reload
29
31
30
32
In Code
31
33
-------
@@ -40,11 +42,11 @@ Example::
40
42
app.run()
41
43
42
44
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).
48
50
49
51
It is however still a perfectly valid method for invoking a non automatic
50
52
reloading application.
0 commit comments