1
00:00:00,240 --> 00:00:00,690
Beautiful.

2
00:00:00,930 --> 00:00:03,360
And as far as the set up, here's where we need to do.

3
00:00:03,810 --> 00:00:05,010
Go to the main repo.

4
00:00:05,430 --> 00:00:09,900
If you don't see Project 11, go back and get it one more time.

5
00:00:10,290 --> 00:00:13,590
Again, my apologies, but I am writing this letter.

6
00:00:13,590 --> 00:00:17,280
So if you don't see the project, we never get back.

7
00:00:17,640 --> 00:00:19,230
Look for a star.

8
00:00:20,130 --> 00:00:27,030
So in the 11 four star and in there, you'll see two things you'll see frontend and server.

9
00:00:27,300 --> 00:00:29,400
Now don't worry about the front right now.

10
00:00:30,000 --> 00:00:31,650
We'll get to it eventually.

11
00:00:32,100 --> 00:00:36,060
Now in the server, you'll notice something really interesting.

12
00:00:36,630 --> 00:00:40,980
Well, this is the case where we're not going to start everything from scratch.

13
00:00:41,820 --> 00:00:46,710
In fact, our project starter is going to be the same exact project.

14
00:00:46,830 --> 00:00:49,590
We just completed the e-commerce one.

15
00:00:50,160 --> 00:00:57,450
And before we continue to explain why, for starters, in my other courses, very often students ask

16
00:00:57,450 --> 00:01:03,840
how to combine project, basically how to add certain functionality to a different project.

17
00:01:04,500 --> 00:01:10,230
And since I'm suspecting that this is going to be the case here as well, I'll right away show you how

18
00:01:10,230 --> 00:01:14,940
we can add all of those features to the existing e-commerce project.

19
00:01:15,330 --> 00:01:22,170
Second, when you start working on bigger projects, a lot of times it's not the separate functionality

20
00:01:22,170 --> 00:01:23,700
that's causing the confusion.

21
00:01:24,210 --> 00:01:29,460
It's the fact that you are so many moving pieces that you need to think of.

22
00:01:30,180 --> 00:01:35,610
But the reality that is how you're going to be working on getting a production application.

23
00:01:36,270 --> 00:01:41,080
And even though it is confusing, it might be even scary in the beginning.

24
00:01:41,520 --> 00:01:46,920
I want you to practice and get comfortable with having a bunch of files and directories.

25
00:01:47,460 --> 00:01:51,810
But with that said, keep in mind that we really are going to work in a few places.

26
00:01:52,650 --> 00:01:59,400
Effectively, we won't change any product or have you set up there just to throw you off your game.

27
00:02:00,000 --> 00:02:05,980
They're just there to get you comfortable with larger code base while working on a project.

28
00:02:06,000 --> 00:02:09,539
We will refactor some existing code, but not much.

29
00:02:10,050 --> 00:02:12,540
With that said, in order to speed up the project.

30
00:02:13,520 --> 00:02:22,580
I want you to navigate to a server and first install dependencies, but before we can run npm start,

31
00:02:23,090 --> 00:02:27,560
let's also set up data entry and fix the document.

32
00:02:28,280 --> 00:02:32,030
So I want to go to a server in this case.

33
00:02:32,280 --> 00:02:37,400
Again, a file on starter and then in the starter, we have frontend and server.

34
00:02:37,850 --> 00:02:39,290
So you want to navigate here.

35
00:02:39,440 --> 00:02:43,010
And I said I should have put City my bed.

36
00:02:43,880 --> 00:02:45,650
So CD, navigate here.

37
00:02:46,010 --> 00:02:50,660
Then once we're in a folder, let's start by installing everything.

38
00:02:50,810 --> 00:02:54,680
So npm, install that to remember.

39
00:02:55,640 --> 00:03:00,140
We used some environment variables in the previous project, correct?

40
00:03:00,800 --> 00:03:04,370
So before we can do anything, we'll have to create a data entry as well.

41
00:03:05,120 --> 00:03:11,090
Now before we do that, I want to go to package Jason and I'm just going to set it back to start where

42
00:03:11,090 --> 00:03:12,020
I have the Nordmann.

43
00:03:12,560 --> 00:03:19,190
Now, if you're wondering why I just don't run npm run dev because I'm pretty comfortable with the start

44
00:03:19,190 --> 00:03:20,870
one, I'm most likely I'll forget them.

45
00:03:20,870 --> 00:03:25,220
Then I'll run around like headless chicken, so might as well just do it this way.

46
00:03:25,700 --> 00:03:30,080
And then once we actually push it up and all that, then we can change it back.

47
00:03:30,110 --> 00:03:30,560
So No.

48
00:03:30,580 --> 00:03:32,870
Nine and then Apertura, let's say that.

49
00:03:33,170 --> 00:03:40,340
And then lastly, like I said, we need to have our data entry, so I want to go to a server, then

50
00:03:40,340 --> 00:03:42,200
I'm going to go with the and.

51
00:03:42,710 --> 00:03:48,830
And this is the case where literally we can go to a previous project where you can set it up from scratch.

52
00:03:48,830 --> 00:03:49,820
That's really up to you.

53
00:03:50,330 --> 00:03:54,740
But in my case, I already have the Commerce one final.

54
00:03:55,220 --> 00:03:57,080
And here I have my data entry.

55
00:03:57,380 --> 00:04:01,250
And in that data entry, these are the three variables that I need.

56
00:04:01,700 --> 00:04:03,230
So let me take everything done.

57
00:04:03,260 --> 00:04:04,940
We're looking for Mongo URL.

58
00:04:05,810 --> 00:04:10,490
We're looking for JWT secret, as well as the lifetime one.

59
00:04:10,850 --> 00:04:12,370
So in my case, I'll take all of this.

60
00:04:12,920 --> 00:04:13,940
I'll copy and paste.

61
00:04:14,240 --> 00:04:16,700
Now we'll have to change some values around.

62
00:04:17,029 --> 00:04:19,820
So for starters, I'm going to go with 11.

63
00:04:20,480 --> 00:04:23,900
And then off workflow, that's going to be my name.

64
00:04:24,380 --> 00:04:30,980
Second, in the previous project, I said that before we push this up to production, we'll set it up

65
00:04:30,980 --> 00:04:33,200
to a proper schedule.

66
00:04:33,200 --> 00:04:33,680
Your secret.

67
00:04:33,950 --> 00:04:34,730
I didn't do it.

68
00:04:35,000 --> 00:04:38,390
My apologies, but we did cover that already before.

69
00:04:38,810 --> 00:04:42,560
So that was the question you just needed to go back to one of the previous videos.

70
00:04:42,950 --> 00:04:46,190
Now, in order to fix that, now I'm going to navigate again.

71
00:04:46,460 --> 00:04:49,190
The site is all keys generator.

72
00:04:49,250 --> 00:04:50,990
Again, there's multiple ways how you can do it.

73
00:04:50,990 --> 00:04:54,080
I prefer the site where you're looking for encryption key.

74
00:04:54,380 --> 00:04:58,370
More specifically, you're looking for 256.

75
00:04:58,940 --> 00:05:01,730
My apologies, my browser today for some reason.

76
00:05:02,180 --> 00:05:03,470
Kind of on one leg.

77
00:05:04,010 --> 00:05:09,380
So I was just showcasing here how we can refresh those values, but effectively I can also grab this

78
00:05:09,380 --> 00:05:09,590
one.

79
00:05:09,740 --> 00:05:12,990
Just remember, once you click here, it's actually going to be generating document.

80
00:05:13,580 --> 00:05:19,730
But again, I don't know why, but today my browser has decided to take a day off, so let me copy and

81
00:05:19,730 --> 00:05:20,090
paste.

82
00:05:20,480 --> 00:05:21,760
That's going to be my secret.

83
00:05:21,770 --> 00:05:22,730
That's my lifetime.

84
00:05:23,090 --> 00:05:24,380
Now I changed here.

85
00:05:24,530 --> 00:05:26,750
I just need to set up my password.

86
00:05:27,200 --> 00:05:32,180
Then I'll save, and then I can go to an address and run and start.

87
00:05:32,480 --> 00:05:37,460
So let me set up my password online and we'll run npm start.

88
00:05:37,650 --> 00:05:40,700
And once I have data entry in place, I'm just going to clear everything.

89
00:05:40,890 --> 00:05:46,400
And if everything is correct, we should have a server running on port five thousand.

90
00:05:46,830 --> 00:05:53,840
Now I strongly suggest not changing the port because you need to keep in mind that eventually we will

91
00:05:54,140 --> 00:06:01,880
involve frontend as well a front end application and you know where we're actually looking for that

92
00:06:02,150 --> 00:06:03,500
server 5000.

93
00:06:03,890 --> 00:06:11,810
So if you take a look at the source and then more specifically, package JSON, if you watched my cookies

94
00:06:11,810 --> 00:06:18,500
coaches video, which was essentially right after we set up the cookies where I showcased why we using

95
00:06:18,500 --> 00:06:22,490
proxy on our store here, proxy and 5000 are gone.

96
00:06:22,490 --> 00:06:29,570
If you didn't, please go back in the previous project, the video where I showcased water gotchas we

97
00:06:29,570 --> 00:06:33,980
need to be aware of when it comes to a frontend and cookies.

98
00:06:34,310 --> 00:06:35,960
So in this case, I don't want to repeat myself.

99
00:06:36,380 --> 00:06:42,920
I'm just telling you that it's very important for you to have a server on 5000 because these are need

100
00:06:42,920 --> 00:06:43,400
to match.

101
00:06:43,880 --> 00:06:47,270
Otherwise, you will have to run around like a headless chicken.

102
00:06:47,300 --> 00:06:50,150
It's not going to work with all of this in place.

103
00:06:50,450 --> 00:06:52,880
Now we're going to start working on our functionality.

