1
00:00:00,390 --> 00:00:01,290
Not bad, not bad.

2
00:00:01,530 --> 00:00:03,990
We have our structure in place.

3
00:00:04,350 --> 00:00:07,320
So now let's do the same thing with jobs.

4
00:00:07,860 --> 00:00:11,430
We want to create jobs controller with these functions.

5
00:00:11,700 --> 00:00:15,390
Great job lead job and you can read the rest again.

6
00:00:15,540 --> 00:00:16,320
Same deal.

7
00:00:16,740 --> 00:00:21,960
Just send back some dummy value, create a job routs, then set up pressure.

8
00:00:21,970 --> 00:00:26,820
Order in this case, can probably already copy and paste the code from the author order.

9
00:00:27,220 --> 00:00:33,980
Then we want to grab the functions from the jobs controller, and the results are going to be following

10
00:00:34,410 --> 00:00:40,110
where the root meaning the API version one jobs is going to have.

11
00:00:40,170 --> 00:00:47,730
Post and get so in here, we'll be able to create a job and get all the jobs then where you want to

12
00:00:47,730 --> 00:00:48,090
go.

13
00:00:48,420 --> 00:00:55,980
We have stats and essentially this is where all access data about the applications, how many are pending

14
00:00:56,310 --> 00:00:57,990
the interviews and all that.

15
00:00:58,350 --> 00:01:01,350
And then we have one for Colon did.

16
00:01:01,740 --> 00:01:06,600
So you are El Primer where we can remove the job as well as update the job.

17
00:01:06,870 --> 00:01:12,480
Now what is important, though, is that you place of his stats above the 80.

18
00:01:13,110 --> 00:01:17,640
Because of his stats, string will be treated as the 80.

19
00:01:18,420 --> 00:01:24,930
And of course, when it comes to Eddie Barry's actual value coming from MongoDB, but when it comes

20
00:01:24,930 --> 00:01:30,530
to stats is just a strength as Express is going to be looking for out is going to say, Hey, listen,

21
00:01:30,540 --> 00:01:35,970
there is no job with this particular idea, which stats so very, very important.

22
00:01:36,270 --> 00:01:38,730
Place it above the REIT.

23
00:01:38,970 --> 00:01:41,010
So let's get cracking.

24
00:01:41,970 --> 00:01:48,540
And first, we want to go with jobs controller, and let's set up those functions, and this is going

25
00:01:48,540 --> 00:01:54,480
to be the case where I will copy and paste from the read me just so I can basically see them right away.

26
00:01:54,900 --> 00:01:57,060
So I'll set it up over here.

27
00:01:57,390 --> 00:01:58,170
My apologies.

28
00:01:58,650 --> 00:02:00,480
Here's way I don't like copying pasting.

29
00:02:01,170 --> 00:02:05,610
But this is going to be the case where I'll do that because it will definitely make my life easier,

30
00:02:05,910 --> 00:02:09,570
where I want to go with content and then create job.

31
00:02:10,080 --> 00:02:11,460
That's my function.

32
00:02:11,850 --> 00:02:14,040
We're going to go here with Iraq and rest.

33
00:02:14,370 --> 00:02:16,980
And then I just want to go with Iraq, not sand.

34
00:02:17,460 --> 00:02:19,860
And let's go with the name all the functions.

35
00:02:19,860 --> 00:02:21,600
So create a job.

36
00:02:21,840 --> 00:02:24,060
Now, before we copy and paste, you know what?

37
00:02:24,420 --> 00:02:26,550
There's actually one thing missing these.

38
00:02:26,550 --> 00:02:32,910
All are going to be a sink show before I forget that back in the off controller, we want to hear the

39
00:02:32,910 --> 00:02:39,000
same thing, and all of these are going to be a sink because we'll be communicating with our database.

40
00:02:39,420 --> 00:02:41,130
So make sure you do that as well.

41
00:02:41,670 --> 00:02:43,590
And now let's go back here.

42
00:02:44,400 --> 00:02:45,750
Copy and paste.

43
00:02:46,350 --> 00:02:51,780
And then let's change those names around where we are looking for get all jobs.

44
00:02:52,290 --> 00:02:54,300
So that's going to be over here.

45
00:02:54,310 --> 00:02:58,650
So get all and jobs, and I'll change the string as well.

46
00:02:58,660 --> 00:03:05,090
So I'll say get all jobs that we want to, I guess, update the job again.

47
00:03:05,100 --> 00:03:07,740
The order is not really important.

48
00:03:08,100 --> 00:03:10,560
I just always like to set up in the order.

49
00:03:10,830 --> 00:03:12,420
But I might mess up.

50
00:03:12,430 --> 00:03:13,620
So again, not a big deal.

51
00:03:13,680 --> 00:03:20,340
We'll have to work and show stats first and then the job, at least in my opinion, it's not a big deal.

52
00:03:20,520 --> 00:03:22,530
So let's say I'm dead job here.

53
00:03:23,130 --> 00:03:31,470
Then we have a daily job, correct the lead job and then be a job over here or a job.

54
00:03:31,830 --> 00:03:33,970
And then lastly, we have show stats.

55
00:03:33,970 --> 00:03:39,240
So that's the case where you can just show stats and show stats around.

56
00:03:39,240 --> 00:03:41,670
So show stats around.

57
00:03:42,060 --> 00:03:43,560
Let's say it again.

58
00:03:43,920 --> 00:03:45,360
Just so I can speed it up.

59
00:03:46,050 --> 00:03:48,990
Take this entire thing or create the year out.

60
00:03:48,990 --> 00:03:52,770
One, I'll say jobs rather.

61
00:03:53,720 --> 00:03:54,340
Reporter.

62
00:03:55,260 --> 00:03:56,430
Then let's import.

63
00:03:57,540 --> 00:04:00,270
Import, copy and paste from.

64
00:04:00,750 --> 00:04:03,960
And we're looking for the controllers in this case.

65
00:04:04,640 --> 00:04:07,650
And more specifically, we want to get the jobs controller.

66
00:04:07,650 --> 00:04:10,920
We want to add jobs and then write about it.

67
00:04:11,340 --> 00:04:12,810
Let's do the same thing.

68
00:04:13,380 --> 00:04:14,700
We're in the Arthur outs.

69
00:04:14,700 --> 00:04:18,750
We already have the router and I don't see the point of repeating myself.

70
00:04:19,140 --> 00:04:22,410
So let's set it up here in the jobs router.

71
00:04:23,520 --> 00:04:26,280
And then let's wrap our roots one by one.

72
00:04:26,820 --> 00:04:34,710
So we're going to go here and we'll export right away the router or export default and then router,

73
00:04:35,280 --> 00:04:41,010
and then let's set up all our routes as far as the jobs are concerned.

74
00:04:41,430 --> 00:04:44,280
And again, the route one will be create job and get all jobs.

75
00:04:44,760 --> 00:04:50,430
And then the other three are going to be one for start and then two for daddy.

76
00:04:50,790 --> 00:04:57,780
So let's say the router that route, let's set up the route and that will be a post on.

77
00:04:58,260 --> 00:05:04,380
So first one will be post create job and then second will be get around where we want to get all the

78
00:05:04,380 --> 00:05:04,800
jobs.

79
00:05:05,160 --> 00:05:07,710
Pretty typical rest structure.

80
00:05:07,860 --> 00:05:09,240
Then I'll say remember.

81
00:05:10,190 --> 00:05:17,760
About Cohen I.D. and I'll set up my stats, so let's copy and paste, let's move down here.

82
00:05:18,030 --> 00:05:19,770
And this is going to be stored throughout.

83
00:05:20,160 --> 00:05:21,750
It's going to be a get request.

84
00:05:22,620 --> 00:05:24,120
So it's going to be a get.

85
00:05:24,540 --> 00:05:31,410
And we want to run our show stats controller violence and move this one.

86
00:05:31,770 --> 00:05:38,790
And then the last one will be drawn out and we're looking for colon I.D. and then delete.

87
00:05:39,540 --> 00:05:45,870
And for this, one will delete the job and for the actual data, job or update job.

88
00:05:46,410 --> 00:05:54,210
And with this in place now, we're just want to go back to a server and learn right after the fourth

89
00:05:54,210 --> 00:06:00,030
router will pretty much do the same thing where we're looking for jobs throughout.

90
00:06:00,420 --> 00:06:10,890
So jobs over here and mine, where we have the back years instead of off say jobs and vets will become

91
00:06:11,190 --> 00:06:12,480
jobs router.

92
00:06:12,930 --> 00:06:15,960
So now with this in place, we can just check what's happening.

93
00:06:16,380 --> 00:06:21,420
And we have can't find mojo imported from jobs are out.

94
00:06:22,660 --> 00:06:28,000
And, of course, because this one I called Marauder and then this one I called around.

95
00:06:28,240 --> 00:06:33,400
So let me fix that small typo, and I think I'm going to go with jumps roots here.

96
00:06:34,240 --> 00:06:40,390
That just makes a little bit more sense since the folder name is around and it looks like have no bugs.

97
00:06:40,870 --> 00:06:48,280
So now we can hop over to a postman and test it out, whether we are getting all our dummy rulers.

