-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sofia/fixes second half course #19
Conversation
… in building the gateway application / get device
@@ -15,7 +13,16 @@ import requests | |||
data = ... # from request | |||
response = requests.get("http://0.0.0.0:5000/items/") | |||
``` | |||
Let's keep it that way for this task, but let's also keep in mind that | |||
This would be totally okay if you wanted to deploy your applications locally (without Docker), however, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be totally okay if you wanted to deploy your applications locally (without Docker). However,
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. | ||
We will come back to this later on. | ||
You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask | ||
you to replace it with `invsys`, so that your url looks something like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you to replace it with invsys
, so that your URL looks something like this:
We will come back to this later on. | ||
You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask | ||
you to replace it with `invsys`, so that your url looks something like this: | ||
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://invsys:5000/items
(check out the URL in the else
clause which is already completed).
You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask | ||
you to replace it with `invsys`, so that your url looks something like this: | ||
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed). | ||
We will explain this in more detail in the next lesson, for now you only need to know that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will explain this in more detail in the next lesson. For now, you only need to know that
you to replace it with `invsys`, so that your url looks something like this: | ||
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed). | ||
We will explain this in more detail in the next lesson, for now you only need to know that | ||
we use Docker under the hood to check these tasks, so `invsys` will be a designated name of a docker-compose service and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use Docker under the hood to check these tasks, so invsys
will be a designated name of a Docker Compose service, and
|
||
<div class="hint"> | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To create the right URL for getting a specific item, you only need to slightly modify the get
URL that is already provided by adding the item_id
to it.
Here we have a Postman mention:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, here
https://github.com/jetbrains-academy/Flask_course_prototype/pull/19/files#diff-5fa9b6e48a152d8458d69a96f561c1bba6ecc6ecd4bf07633f9ee24e3b31121bR34
We can add “If you want to allow direct targeting of invsys as well, you would just need to add ports: - "5000:5000" to invsys service description.” to make it more clear
…hing_note Add note about secure port publishing
No description provided.