File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Building the Gateway Application/Get Devices Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,16 @@ import requests
13
13
data = ... # from request
14
14
response = requests.get(" http://0.0.0.0:5000/items/" )
15
15
```
16
- Let's keep it that way for this task, but let's also keep in mind that
16
+ This would be totally okay if you wanted to deploy your applications locally (without Docker), however,
17
17
by doing this, our application source code becomes coupled with how and where we deploy ` invsys ` .
18
- Instead, we can post to ` http://invsys:5000/items ` and ensure that our network is set up to route ` invsys ` to whichever IP it is hosted on.
19
- We will come back to this later on.
18
+ You can use ` 0.0.0.0 ` for local deployment if you like, but for checking this task, we ask
19
+ you to replace it with ` invsys ` , so that your url looks something like this:
20
+ ` http://invsys:5000/items ` (check out the url in the ` else ` clause which is already completed).
21
+ We will explain this in more detail in the next lesson, for now you only need to know that
22
+ we use Docker under the hood to check these tasks, so ` invsys ` will be a designated name of a docker-compose service and
23
+ Docker will take care of names and routing.
24
+
25
+ <div class =" hint " >
26
+
27
+ To create the right url for getting a specific item you only need to slightly modify the get url that is already provided - add the ` item_id ` to it.
28
+ </div >
You can’t perform that action at this time.
0 commit comments