Skip to content

Commit 74b3d91

Browse files
committed
added a more detailed explanation of what happens with ips and docker in building the gateway application / get device
1 parent 6f8d725 commit 74b3d91

File tree

1 file changed

+12
-3
lines changed
  • Building the Gateway Application/Get Devices

1 file changed

+12
-3
lines changed

Building the Gateway Application/Get Devices/task.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ import requests
1313
data = ... # from request
1414
response = requests.get("http://0.0.0.0:5000/items/")
1515
```
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,
1717
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>

0 commit comments

Comments
 (0)