1
00:00:00,200 --> 00:00:00,620
All right.

2
00:00:00,830 --> 00:00:06,620
Up next, again, let's install all the libraries we're going to use on the server.

3
00:00:06,620 --> 00:00:14,630
But before we do that, we also want to set up a git ignore in the root because, of course, we don't

4
00:00:14,630 --> 00:00:22,610
want to push the nodemodules and rest of the stuff up to a GitHub and technically you can type all of

5
00:00:22,610 --> 00:00:24,200
the values from the scratch yourself.

6
00:00:24,200 --> 00:00:27,410
So first let's create a dot git.

7
00:00:28,350 --> 00:00:29,100
Ignore.

8
00:00:29,190 --> 00:00:36,540
But actually, my preference is to copy values from already existing client, because pretty much everything

9
00:00:36,540 --> 00:00:38,090
that I need is already there.

10
00:00:38,100 --> 00:00:39,840
So let me save it over here.

11
00:00:39,870 --> 00:00:43,050
That's going to be my git ignore in the root.

12
00:00:44,010 --> 00:00:47,850
And then once we have that one in place, you know what I think?

13
00:00:48,680 --> 00:00:50,780
I can just remove all of this code.

14
00:00:52,120 --> 00:00:53,200
From the server.

15
00:00:53,200 --> 00:00:54,580
I don't think we'll need it.

16
00:00:55,660 --> 00:00:59,650
You can also remove test default and test.

17
00:01:00,590 --> 00:01:01,280
Named.

18
00:01:02,760 --> 00:01:04,560
We won't use those ones either.

19
00:01:05,720 --> 00:01:08,030
And then let me check the Readme.

20
00:01:08,060 --> 00:01:12,110
Now, if you want, you can set up the source control if you're interested.

21
00:01:12,260 --> 00:01:15,770
So essentially push this entire project right now.

22
00:01:16,890 --> 00:01:21,570
Up to a GitHub, but in my case, I'm not going to do that right now, so I'm going to do that at the

23
00:01:21,570 --> 00:01:23,160
very, very end.

24
00:01:23,550 --> 00:01:30,450
And essentially you want to grab this code and these are the packages we're going to install.

25
00:01:30,450 --> 00:01:33,390
So I'm going to copy and paste, run this.

26
00:01:33,570 --> 00:01:42,600
And while the install is taking place, also in a script, I want to create a setup project script which

27
00:01:42,600 --> 00:01:49,320
is going to install dependencies on the server, then navigate to a client and do the same thing.

28
00:01:49,350 --> 00:01:57,570
And this is going to be very useful command whether you're grabbing the project from the GitHub or when

29
00:01:57,570 --> 00:02:04,350
we deploy, because once we deploy on render platform, which we're going to use, we'll use the same

30
00:02:04,350 --> 00:02:05,040
command.

31
00:02:05,220 --> 00:02:13,740
Essentially it just installs all the dependencies, the client one as well as the server one.

32
00:02:13,740 --> 00:02:19,150
And just so we can test it, I know it's a little bit redundant, but I'm going to remove the existing

33
00:02:19,150 --> 00:02:25,690
node modules that we just installed from the server and also from the client just to showcase that.

34
00:02:26,440 --> 00:02:27,970
Actually, this command works.

35
00:02:28,000 --> 00:02:37,420
Then let's navigate to a package.json over here in the server and effectively let's set up that script.

36
00:02:38,080 --> 00:02:43,210
So we're going to go with setup project or whichever name you want.

37
00:02:43,850 --> 00:02:48,320
And then NPM I, which is going to install on the server.

38
00:02:48,320 --> 00:02:56,100
And then we want to navigate to a client folder and effectively repeat the same step.

39
00:02:56,120 --> 00:02:57,590
And now let's test it out.

40
00:02:57,620 --> 00:03:05,210
We want to go with NPM run and set up project and if everything is correct.

41
00:03:05,940 --> 00:03:10,770
Again, we're going to install all the packages on the server as well as the client.

42
00:03:10,770 --> 00:03:12,930
So notice over here I have the node modules.

43
00:03:12,960 --> 00:03:13,620
Awesome.

44
00:03:14,390 --> 00:03:19,250
And then also I'll have the node modules eventually over here in the client.

45
00:03:19,640 --> 00:03:21,300
Yep, there it is.

46
00:03:21,320 --> 00:03:25,550
And with this in place, we are ready to move on to the next step.

