1
00:00:02,100 --> 00:00:04,640
<v Narrator>Now sending such an HTTP request</v>

2
00:00:04,640 --> 00:00:08,590
to a website or web API is actually not the only

3
00:00:08,590 --> 00:00:13,110
kind of communication we could have in a dockerized app.

4
00:00:13,110 --> 00:00:17,290
Maybe we also have something on our hosting machine,

5
00:00:17,290 --> 00:00:21,220
some web service or a database, anything like that,

6
00:00:21,220 --> 00:00:25,940
and we wanna talk to that from inside our dockerized app.

7
00:00:25,940 --> 00:00:28,280
So we then still want to communicate

8
00:00:28,280 --> 00:00:31,460
with something outside of the container

9
00:00:31,460 --> 00:00:35,750
but something is not a website or anything like that,

10
00:00:35,750 --> 00:00:39,140
but instead it's a service running on our host machine.

11
00:00:39,140 --> 00:00:42,210
Just not a service in a network container

12
00:00:42,210 --> 00:00:44,570
let's say, but simply a database

13
00:00:44,570 --> 00:00:48,140
for example, which runs on our machine, just like that,

14
00:00:48,140 --> 00:00:53,140
totally without docker, we could also have this scenario.

15
00:00:53,430 --> 00:00:55,610
And that's also something which we'll cover

16
00:00:55,610 --> 00:00:57,220
in this demo application

17
00:00:57,220 --> 00:01:00,270
which you find attached to the last lecture.

18
00:01:00,270 --> 00:01:02,540
There in this demo application,

19
00:01:02,540 --> 00:01:07,440
we do not just have code to talk to this Star Wars API.

20
00:01:07,440 --> 00:01:09,140
We also have code

21
00:01:09,140 --> 00:01:13,720
to fetch and store data in our own database.

22
00:01:13,720 --> 00:01:18,530
And therefore we also have code to connect to this database.

23
00:01:18,530 --> 00:01:21,120
In this case, we're going to use MongoDB

24
00:01:21,120 --> 00:01:24,210
which is a quite popular database engine.

25
00:01:24,210 --> 00:01:25,970
You could say a database solution,

26
00:01:25,970 --> 00:01:28,380
which we can use and we're going to connect

27
00:01:28,380 --> 00:01:33,380
to a Mongo database here which runs on our host machine

28
00:01:34,220 --> 00:01:36,380
and disdain for mean that.

29
00:01:36,380 --> 00:01:37,570
This

30
00:01:37,570 --> 00:01:38,890
demo

31
00:01:38,890 --> 00:01:40,970
project here this demo application

32
00:01:40,970 --> 00:01:44,560
which we're building with Node JS needs to be able to talk

33
00:01:44,560 --> 00:01:46,940
to a database, which is not running

34
00:01:46,940 --> 00:01:51,100
in a container, but on my host machine, just like that.

35
00:01:51,100 --> 00:01:53,840
So communicating from inside your container

36
00:01:53,840 --> 00:01:56,440
from inside your containerized application

37
00:01:56,440 --> 00:01:59,410
I should say to some other service running

38
00:01:59,410 --> 00:02:02,980
on your host machine, that is definitely another scenario

39
00:02:02,980 --> 00:02:07,130
of communication between a container or a containerized app

40
00:02:07,130 --> 00:02:10,070
and something outside of that container.

41
00:02:10,070 --> 00:02:11,863
In this case, the host machine.

