1
00:00:00,390 --> 00:00:06,450
And before we go any further, let's address the elephant in the room, why jazz is so slim.

2
00:00:07,050 --> 00:00:13,590
You see, while I'm a big fan of reusing the code, especially for smaller projects, in my opinion,

3
00:00:13,590 --> 00:00:21,510
at some point it's also very useful to reiterate why and how we're doing something just so we're comfortable

4
00:00:21,510 --> 00:00:24,780
doing that when we need to start working on our own project.

5
00:00:25,530 --> 00:00:31,350
Now, since Course has quite a few projects, in my opinion, it would be very annoying and redundant

6
00:00:31,740 --> 00:00:33,990
if we would do that in every project.

7
00:00:34,590 --> 00:00:38,010
But while building bigger project, I think it's very useful.

8
00:00:38,520 --> 00:00:43,860
Also, while we're setting everything up, basically while we work on the stuff we already have covered

9
00:00:44,250 --> 00:00:50,970
in some shape or form, I will share two steps I'm about to take and I highly encourage you to stop

10
00:00:50,970 --> 00:00:55,140
the video and try to implement the functionality yourself first.

11
00:00:55,650 --> 00:01:02,070
That way, you'll get more comfortable with a setup when you need to start working on your own project.

12
00:01:02,340 --> 00:01:05,519
Now, let me be very clear, though this does not.

13
00:01:05,519 --> 00:01:09,840
It does not mean that you need to start every project from scratch.

14
00:01:10,350 --> 00:01:17,940
There's the reason why we set up reusable code and basically drag from project to project, but especially

15
00:01:17,940 --> 00:01:18,810
in the beginning.

16
00:01:19,260 --> 00:01:23,700
While you're still iffy about some stuff, it's very useful to repeat some steps.

17
00:01:24,150 --> 00:01:24,630
All right.

18
00:01:25,050 --> 00:01:31,170
And once I'm done with my painful one person Broadway edition, let's get to work and surprise surprise.

19
00:01:31,710 --> 00:01:35,940
I'll start everything by setting up a basic express server.

20
00:01:36,450 --> 00:01:38,880
So here are steps that I want you to take.

21
00:01:39,210 --> 00:01:39,600
First.

22
00:01:41,030 --> 00:01:46,120
In Port Express and a senator, the variable, I remember there was that middle step where we need to

23
00:01:46,300 --> 00:01:50,480
invoke Express when set up a port variable.

24
00:01:50,800 --> 00:01:53,920
And in this case, we'll be listening for Port 5000.

25
00:01:54,570 --> 00:02:01,030
And it's going to make sense a little bit later, as well as set up a start function where you'll be

26
00:02:01,030 --> 00:02:05,020
listening on that port for incoming requests.

27
00:02:05,350 --> 00:02:07,960
So stop the video, try to implement yourself.

28
00:02:08,440 --> 00:02:11,050
And once you're ready to go, hit play.

29
00:02:11,800 --> 00:02:12,220
All right.

30
00:02:12,550 --> 00:02:16,950
Hopefully, everything went as expected, so I'm going to go to our progress.

31
00:02:17,410 --> 00:02:23,320
I'll remove my lovely console.log and we'll start by getting the expression, so I'll just set up a

32
00:02:23,320 --> 00:02:23,800
comment.

33
00:02:23,800 --> 00:02:28,270
Express concern expressed is equal to your acquire.

34
00:02:29,210 --> 00:02:36,910
And we're looking for express package one to remember, we need to add a step where there is a variable

35
00:02:37,340 --> 00:02:43,220
in most cases is going to be apt, but again, this is really up to you when we invoke, Express and

36
00:02:43,220 --> 00:02:47,750
now we have all the express functionality in our app variable.

37
00:02:48,050 --> 00:02:55,100
When we want to go with start function or can't start, it's going to be async since eventually we'll

38
00:02:55,100 --> 00:02:56,750
also have our connectivity.

39
00:02:57,020 --> 00:02:59,360
But for time being, doesn't really matter.

40
00:02:59,750 --> 00:03:01,940
Van, we'll set up a track again.

41
00:03:02,330 --> 00:03:09,260
This is for our database connection, but for the time being, we just want to go with app back and

42
00:03:09,260 --> 00:03:09,620
listen.

43
00:03:10,190 --> 00:03:15,080
Now, before I go any further, I need to go and check that I imported Express.

44
00:03:15,110 --> 00:03:16,010
Okay, that's good.

45
00:03:16,500 --> 00:03:18,020
But I didn't set up the variable.

46
00:03:18,440 --> 00:03:24,950
So before I go any further, we go with concert and this is going to be equal to the fourth round.

47
00:03:24,950 --> 00:03:28,310
We're looking for process and unity.

48
00:03:29,000 --> 00:03:37,070
And of course, the variable is support now if it's not available and we're going to go for 5000, which

49
00:03:37,070 --> 00:03:39,260
is going to be our basic setup while developing.

50
00:03:39,620 --> 00:03:43,220
And now I can go back to start where I have app about.

51
00:03:43,220 --> 00:03:43,640
Listen.

52
00:03:43,910 --> 00:03:45,110
So that was the method.

53
00:03:45,560 --> 00:03:47,330
Then we need to provide a port.

54
00:03:47,720 --> 00:03:50,780
So of course, this is going to be the variable now report one.

55
00:03:51,260 --> 00:03:55,670
And let's also right away at a console log that we're listening on that board.

56
00:03:55,670 --> 00:04:02,000
So console log of may remove the code one here and we're going to go with template strings instead.

57
00:04:02,420 --> 00:04:03,540
Since I want to print out.

58
00:04:03,860 --> 00:04:05,270
Well, what is the port variable?

59
00:04:05,630 --> 00:04:07,640
So we're going to go with server is listening.

60
00:04:09,590 --> 00:04:16,070
And we're going to add port and let's access the port of entry, but let's add something about that

61
00:04:16,070 --> 00:04:18,589
is just my preference and as far as the error.

62
00:04:19,190 --> 00:04:24,500
Well, let's just go with log and let's console.log the error.

63
00:04:24,830 --> 00:04:32,750
And if everything is correct, once we start up the function, we should see server is listening on

64
00:04:32,750 --> 00:04:33,710
port five thousand.

65
00:04:34,310 --> 00:04:37,670
And since I do now, I can move on to the next task.

