Updated sample program in README
This commit is contained in:
parent
6a4b516fd8
commit
42c9a0276e
1 changed files with 17 additions and 2 deletions
17
README.rst
17
README.rst
|
|
@ -20,7 +20,7 @@ community that make adding new functionality easy.
|
||||||
Installing
|
Installing
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Install and update using `pip`_:
|
In a terminal, install or update Flask using `pip`_:
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
|
|
@ -32,6 +32,10 @@ Install and update using `pip`_:
|
||||||
A Simple Example
|
A Simple Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
In a code editor or IDE of your choice, create a new file: app.py
|
||||||
|
|
||||||
|
Copy and paste the following code snippet into the app.py file.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# save this as app.py
|
# save this as app.py
|
||||||
|
|
@ -43,11 +47,22 @@ A Simple Example
|
||||||
def hello():
|
def hello():
|
||||||
return "Hello, World!"
|
return "Hello, World!"
|
||||||
|
|
||||||
|
Save your file.
|
||||||
|
|
||||||
|
To execute the program, run the following command in a terminal:
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
$ flask run
|
$ flask run
|
||||||
|
|
||||||
|
You will receive the following message:
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
|
||||||
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
|
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
|
||||||
|
|
||||||
|
You can open this address in an internet browser window to view your program.
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue