Narrator: Now sending such an HTTP request
to a website or web API is actually not the only
kind of communication we could have in a dockerized app.
Maybe we also have something on our hosting machine,
some web service or a database, anything like that,
and we wanna talk to that from inside our dockerized app.
So we then still want to communicate
with something outside of the container
but something is not a website or anything like that,
but instead it's a service running on our host machine.
Just not a service in a network container
let's say, but simply a database
for example, which runs on our machine, just like that,
totally without docker, we could also have this scenario.
And that's also something which we'll cover
in this demo application
which you find attached to the last lecture.
There in this demo application,
we do not just have code to talk to this Star Wars API.
We also have code
to fetch and store data in our own database.
And therefore we also have code to connect to this database.
In this case, we're going to use MongoDB
which is a quite popular database engine.
You could say a database solution,
which we can use and we're going to connect
to a Mongo database here which runs on our host machine
and disdain for mean that.
This
demo
project here this demo application
which we're building with Node JS needs to be able to talk
to a database, which is not running
in a container, but on my host machine, just like that.
So communicating from inside your container
from inside your containerized application
I should say to some other service running
on your host machine, that is definitely another scenario
of communication between a container or a containerized app
and something outside of that container.
In this case, the host machine.