1
00:00:00,540 --> 00:00:07,200
And with our most basic example in place now, I'm going to start throwing mine grenades at you, first

2
00:00:07,200 --> 00:00:13,470
of all, I want to let you know that, of course, we're not limited to passing in the age the HDMI

3
00:00:13,470 --> 00:00:16,560
directly into the dot, right.

4
00:00:16,560 --> 00:00:25,350
Or not that meaning imagine if you would have to every time just set it up over your HMO in methods

5
00:00:25,350 --> 00:00:25,920
directly.

6
00:00:26,310 --> 00:00:29,220
Of course, what we can do instead is set up the file.

7
00:00:30,130 --> 00:00:34,330
Then required to file using the file system and then just pass it.

8
00:00:34,890 --> 00:00:41,550
Now keep in mind one thing, though, where we will be passing in the contents of the file, not the

9
00:00:41,550 --> 00:00:42,410
file itself.

10
00:00:42,960 --> 00:00:43,970
And that's very important.

11
00:00:43,980 --> 00:00:45,940
We'll be passing in the contents of the file.

12
00:00:45,970 --> 00:00:51,930
So that means we still need to use this content type just because we're going to be getting the data

13
00:00:51,930 --> 00:00:54,870
from the my file doesn't really mean anything.

14
00:00:55,410 --> 00:00:56,540
Yes, it's nice.

15
00:00:56,550 --> 00:01:02,460
It's going to make our lives easier if we want to set up a more meaningful Web page, but we still need

16
00:01:02,460 --> 00:01:03,990
to set up the content type.

17
00:01:04,349 --> 00:01:13,260
Now, this is going to be a temporary file because in the next video, we'll cover a more serious example.

18
00:01:13,500 --> 00:01:16,470
And I already prepared all the files for you.

19
00:01:16,830 --> 00:01:19,200
So this is where we'll really struggle.

20
00:01:19,450 --> 00:01:22,730
And this is where I'll show you why we use the Express.

21
00:01:23,040 --> 00:01:29,640
But for now, if you want to follow along, just create a simple index email or about Estima.

22
00:01:29,640 --> 00:01:33,630
Doesn't really matter how you call the file in the folder.

23
00:01:33,870 --> 00:01:35,430
Again, this is really optional.

24
00:01:35,740 --> 00:01:39,840
I'm going to go with new file and I'm going to call this index HMO.

25
00:01:40,140 --> 00:01:46,170
And again, the whole reason why I'm doing that, because I want to set up a more proper page and I

26
00:01:46,170 --> 00:01:49,260
don't want to type everything here in the right order.

27
00:01:49,260 --> 00:01:51,630
And I mean, it's much more nicer here, right?

28
00:01:51,650 --> 00:01:55,350
So I'm just going to go with Amet set up individual pseudocode.

29
00:01:55,560 --> 00:02:03,420
I get my basics and I can say on page, on page, and then I'm just going to go with the heading for

30
00:02:03,790 --> 00:02:04,270
whole world.

31
00:02:04,540 --> 00:02:07,700
Again, this is just the showcase that sky's the limit.

32
00:02:08,550 --> 00:02:10,600
Just like you normally would surreptitiously email.

33
00:02:10,620 --> 00:02:16,770
You can do exactly the same thing, and then I'm going to go back to app jazz and first of all, I'm

34
00:02:16,770 --> 00:02:18,780
going to get the read file.

35
00:02:18,900 --> 00:02:22,950
So I'm going to go and then read file and think.

36
00:02:22,950 --> 00:02:26,030
And I'm going to talk about why I'm using this thing in a second.

37
00:02:26,040 --> 00:02:27,200
So don't freak out.

38
00:02:27,210 --> 00:02:32,460
I know I mentioned before that we need to be mindful of the methods that we use.

39
00:02:33,300 --> 00:02:38,370
That there is a difference between the blocking and non blocking and I'm just going to go with FSR over

40
00:02:38,370 --> 00:02:42,180
here and we need to come up with some kind of name.

41
00:02:42,480 --> 00:02:46,440
And again, in the next video, there's going to be more data here.

42
00:02:46,680 --> 00:02:51,560
So that's why I'll get all files for the time being in this video.

43
00:02:51,600 --> 00:02:54,370
Just get one and I'm going to call this home page again.

44
00:02:54,750 --> 00:02:56,490
Call it whatever you want.

45
00:02:56,490 --> 00:02:57,690
You can call this Bobby Lee.

46
00:02:58,080 --> 00:02:59,640
Doesn't really matter is just a variable.

47
00:02:59,910 --> 00:03:03,150
And we're going to go read, file and sync.

48
00:03:03,150 --> 00:03:04,440
And of course, where's the file?

49
00:03:04,680 --> 00:03:05,910
It is in the same folder.

50
00:03:05,910 --> 00:03:07,290
So we go with relative path.

51
00:03:07,560 --> 00:03:09,940
And I'm just going to call this index ASML.

52
00:03:10,140 --> 00:03:17,460
Now, again, we're getting the content now why I'm using here the read file saying, well, there's

53
00:03:17,460 --> 00:03:17,930
two reasons.

54
00:03:17,940 --> 00:03:24,630
First of all, we need to keep in mind that we're not invoking this every time someone comes to the

55
00:03:24,630 --> 00:03:25,080
server.

56
00:03:25,560 --> 00:03:31,610
Please keep in mind that we require that file when we instantiate our server.

57
00:03:32,250 --> 00:03:36,750
So basically that initial time when the server starts running.

58
00:03:37,140 --> 00:03:39,120
So it's not like when the request comes in.

59
00:03:39,150 --> 00:03:41,090
Then again, every time we requesting the file.

60
00:03:41,460 --> 00:03:42,360
Yes, of course.

61
00:03:42,360 --> 00:03:46,590
If I were to place this in the block, yeah.

62
00:03:46,590 --> 00:03:47,700
That's a different scenario.

63
00:03:47,880 --> 00:03:54,210
Meaning if I were to even place this in the great server again, same scenario, but not in here, then

64
00:03:54,210 --> 00:03:55,560
we're just requesting this once.

65
00:03:56,010 --> 00:03:57,970
That's the first reason why I went to that.

66
00:03:57,980 --> 00:03:59,520
And second is just an example.

67
00:03:59,520 --> 00:04:04,470
So I want to make my life a little bit easier when I want to focus on something else with this home

68
00:04:04,470 --> 00:04:05,780
page in place.

69
00:04:05,970 --> 00:04:12,960
Now, of course, what I would want is to go back to my if where I'm checking for the homepage and instead

70
00:04:12,960 --> 00:04:14,730
of going with that right.

71
00:04:14,730 --> 00:04:19,680
And then typing it out, which is going to go with our comments now, again, we're still keeping this

72
00:04:19,680 --> 00:04:19,950
one.

73
00:04:20,350 --> 00:04:25,680
The text that Schimel and I'll show you in a second what happens if we change it to a text plain and

74
00:04:25,680 --> 00:04:33,930
now we go with a homepage and I'll be prepared to be amazed because if I go to not John, my resource,

75
00:04:33,930 --> 00:04:35,010
of course, doesn't exist.

76
00:04:35,190 --> 00:04:36,380
There it is.

77
00:04:36,390 --> 00:04:36,920
Check it out.

78
00:04:36,930 --> 00:04:44,750
We have homepage as well as the whole world so we can start making some meaningful HDMI out pages and

79
00:04:44,760 --> 00:04:48,630
we can serve them with our awesome server.

80
00:04:48,780 --> 00:04:57,240
And just to reemphasize my point, if we change this to a plain save and refresh, now, of course,

81
00:04:57,390 --> 00:04:58,590
we're getting a text.

82
00:04:58,890 --> 00:05:03,710
So, yes, it is very important of what content type we are setting up.

83
00:05:03,900 --> 00:05:05,730
So let's go back to the email.

84
00:05:06,000 --> 00:05:07,880
And of course, we are in good shape.

85
00:05:08,010 --> 00:05:08,470
Awesome.

86
00:05:08,790 --> 00:05:11,370
We have our home page now.

87
00:05:11,370 --> 00:05:18,960
Of course, I can go to the next level and go wild and crazy with my page set up.

