You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .learn/exercises/03.3-your-first-route/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Since Flask is a server, it only makes sense to add some URLs to expose over the internet, for example: `mydomain.com/hello`
4
4
5
-
As a developer, if we would like people to visit `http://mydomain.com/hello` and show a message like `Hello World` to those people, we have to add the following endpoint inside our `app.py` file:
5
+
As a developer, if we would like people to visit `http://mydomain.com/myroute` and show a message like `Hello World!` to those people, we have to add the following endpoint inside our `app.py` file:
6
6
7
7
```python
8
8
@app.route('/myroute', methods=['GET'])
@@ -16,7 +16,7 @@ def hello_world():
16
16
17
17
+ The second line defines a function that will be called by Flask when that endpoint is called by the user (when the user requests `/myroute`).
18
18
19
-
+ The third line defines our function execution and in this case, returns the text "Hello World!" to the requesting client or browser.
19
+
+ The third line defines our function execution and in this case, returns the text `"Hello World!"` to the requesting client or browser.
0 commit comments