1
00:00:00,500 --> 00:00:06,380
All right, and once our basic app is up and running, let's start setting up the structure and we'll

2
00:00:06,380 --> 00:00:12,860
start with our controllers so essential in here, we want to set up the functions that eventually will

3
00:00:12,860 --> 00:00:14,780
be controllers for our roads.

4
00:00:15,230 --> 00:00:17,050
And I want to start with us.

5
00:00:17,060 --> 00:00:19,700
And again, this is just going to be a structure.

6
00:00:19,970 --> 00:00:26,520
So I'll just add some dummy code like a registered user or login user and that sort of stuff.

7
00:00:26,750 --> 00:00:29,070
So let's go here with const register.

8
00:00:29,130 --> 00:00:31,010
So this is going to be our first function.

9
00:00:31,310 --> 00:00:34,020
And again, it's going to be a sink or and address.

10
00:00:34,040 --> 00:00:38,930
And in the body, like I said, I'm just going to go with the residents and and we'll go the registered

11
00:00:38,930 --> 00:00:41,120
user register user.

12
00:00:41,420 --> 00:00:45,470
And then as far as the author out, the second one will be along in one square.

13
00:00:45,580 --> 00:00:46,760
Just copy and paste.

14
00:00:47,060 --> 00:00:52,220
And I simply want to change here the name of the function as well as the string.

15
00:00:52,370 --> 00:01:00,830
So let's go with the register login or I'm sorry, we're going to go with the login user, my bad login

16
00:01:01,610 --> 00:01:05,180
and let's go with user since I have the controller.

17
00:01:05,349 --> 00:01:07,100
I also want to export it.

18
00:01:07,400 --> 00:01:14,900
So we're going to go with the module then export and I'll set it up as an object and we'll go the register

19
00:01:15,230 --> 00:01:16,130
and log in.

20
00:01:16,460 --> 00:01:22,760
And essentially in order to speed it up, I just want to take this whole thing copy and then back in

21
00:01:22,760 --> 00:01:30,080
the jobs we're going to go with, get all jobs, get a job, great job, a day job.

22
00:01:30,080 --> 00:01:33,560
And the only job, essentially, we have a quad functionality.

23
00:01:33,890 --> 00:01:37,110
So I can just remove the second function as well as the login one.

24
00:01:37,130 --> 00:01:38,420
We will rename them.

25
00:01:38,660 --> 00:01:41,170
Let's just start with get all jobs.

26
00:01:41,180 --> 00:01:44,210
So this is going to be a girl that gets me all the jobs.

27
00:01:44,780 --> 00:01:47,330
So I'll say the same thing in strength.

28
00:01:47,330 --> 00:01:48,760
So get all jobs.

29
00:01:48,770 --> 00:01:51,230
Let's just change what function we're exporting.

30
00:01:51,590 --> 00:01:56,950
And now we want to copy and paste this four times, I believe one, two, three and four.

31
00:01:57,020 --> 00:01:59,980
So go here would get a job.

32
00:01:59,990 --> 00:02:02,600
This is going to be allowed to get a single job.

33
00:02:02,930 --> 00:02:05,630
Then we have one for creating a job.

34
00:02:05,960 --> 00:02:14,000
So create and job as far as a string go to create job then we have one for updating the job.

35
00:02:15,640 --> 00:02:19,190
The job and let's do it over here as well.

36
00:02:19,780 --> 00:02:24,430
Update job and lastly, we have one for bleeding jobs.

37
00:02:24,430 --> 00:02:27,060
So let's say delete and job.

38
00:02:27,070 --> 00:02:28,960
The same goes for string.

39
00:02:29,290 --> 00:02:30,400
So delete job.

40
00:02:30,700 --> 00:02:36,660
And now I just want to add the rest of the functions in my object, the one that I'm exporting.

41
00:02:36,970 --> 00:02:39,100
So go and get a job then.

42
00:02:39,100 --> 00:02:46,110
We're looking for create job of the update jobs, the karma of day job and a job.

43
00:02:46,450 --> 00:02:52,330
And once we have the basic controller structure in place now, of course we can do the same thing with

44
00:02:52,330 --> 00:02:52,950
our roots.

