1
00:00:00,180 --> 00:00:00,700
Nice.

2
00:00:00,750 --> 00:00:09,240
Hopefully we are clear on static assets, and before we cover more complex topics, I would want to

3
00:00:09,240 --> 00:00:13,730
throw a microphone at you and it goes something like this.

4
00:00:14,250 --> 00:00:21,240
So if we put two and two together, talked about static assets in the previous video.

5
00:00:22,070 --> 00:00:25,180
But if we're looking at the index, the amount.

6
00:00:26,060 --> 00:00:31,170
Isn't this a static asset as well, and of course, the answer is yes.

7
00:00:31,850 --> 00:00:33,770
So instead of sending this file.

8
00:00:34,760 --> 00:00:41,180
We can add it to your static assets and we're going to be in good shape, and if I have to be perfectly

9
00:00:41,180 --> 00:00:49,920
honest with you, when it comes to sandpile, if we're using it to send back, for example, in the

10
00:00:49,970 --> 00:00:54,560
amount, actually we use other two methods instead.

11
00:00:54,920 --> 00:01:00,770
So first, I'll show you the first one where we just dump everything as far as the static assets.

12
00:01:00,980 --> 00:01:09,950
So I'll just add index to all my static assets in public and that will effectively do exactly the same

13
00:01:10,100 --> 00:01:12,560
like we're doing here with sandpile.

14
00:01:12,740 --> 00:01:16,160
And the other one is going to be using templating engine.

15
00:01:16,170 --> 00:01:19,350
So of course that one will cover when we go to service.

16
00:01:20,300 --> 00:01:25,550
So I'm just trying to showcase that, yes, there is this option of sandpile and we might use it from

17
00:01:25,550 --> 00:01:31,010
time to time throughout the course, but not for sending back in the files.

18
00:01:31,280 --> 00:01:37,400
So first, let me just say that the other option, one of the two other options that we use the most

19
00:01:37,640 --> 00:01:42,020
throughout the course is just adding to static.

20
00:01:43,270 --> 00:01:49,450
Assets like so, and then the second one is going to be server side rendering, where basically we'll

21
00:01:49,450 --> 00:01:50,840
use template engine for that.

22
00:01:51,370 --> 00:01:56,190
So in order to set everything up now, of course, I just need to take my index.

23
00:01:56,740 --> 00:01:58,720
And again, if you want, you can just move it.

24
00:01:59,200 --> 00:02:02,120
Or in my case, I'm just going to copy and paste.

25
00:02:02,710 --> 00:02:09,570
So again, I'm going to go back to my folder and zoom in massively so you can see better circles.

26
00:02:09,580 --> 00:02:10,509
Predatorial.

27
00:02:10,840 --> 00:02:17,590
There is my number up and I'll just take the index HTML and I'll copy and paste and now it is in the

28
00:02:17,590 --> 00:02:17,990
public.

29
00:02:18,520 --> 00:02:23,010
So what happens in the email is always going to be a root.

30
00:02:23,740 --> 00:02:31,690
So when the user hits the server by default, server will serve this index ASML and since our index

31
00:02:31,930 --> 00:02:38,890
email basically has all the paths to browser up to Logo's and all that, we're going to be in good shape

32
00:02:39,100 --> 00:02:40,050
more effectively.

33
00:02:40,060 --> 00:02:43,610
We don't even need to set up this sandpile option.

34
00:02:44,350 --> 00:02:46,750
So now of course, I can just save it.

35
00:02:47,020 --> 00:02:50,200
And once I refresh notice, nothing's changed.

36
00:02:50,530 --> 00:02:55,500
I'm still serving my app, so we're still in good shape.

37
00:02:55,510 --> 00:03:00,820
And if you take a look at the network that notice everything still works correctly.

38
00:03:01,060 --> 00:03:09,010
I'm still getting all the access, all the browser JavaScript functionality as well as the logo.

39
00:03:09,340 --> 00:03:15,370
And to answer your question, yes, that is effectively how you can set up the simple sites.

40
00:03:15,610 --> 00:03:22,780
You can simply just dump all your files in the public, just make sure that you serve them up and that's

41
00:03:22,780 --> 00:03:23,020
it.

42
00:03:23,020 --> 00:03:24,120
And you're in good shape.

43
00:03:24,130 --> 00:03:25,720
Now, we still have the four or four.

44
00:03:26,050 --> 00:03:33,130
But as far as just serving straight up sites with HDMI access and jouster, yes, you can simply dump

45
00:03:33,130 --> 00:03:33,970
them in a public.

46
00:03:34,270 --> 00:03:41,080
You can simply set up the middleware and serve all the static assets and you're going to be in good

47
00:03:41,080 --> 00:03:41,350
shape.

