Not bad, not bad.
We have our structure in place.
So now let's do the same thing with jobs.
We want to create jobs controller with these functions.
Great job lead job and you can read the rest again.
Same deal.
Just send back some dummy value, create a job routs, then set up pressure.
Order in this case, can probably already copy and paste the code from the author order.
Then we want to grab the functions from the jobs controller, and the results are going to be following
where the root meaning the API version one jobs is going to have.
Post and get so in here, we'll be able to create a job and get all the jobs then where you want to
go.
We have stats and essentially this is where all access data about the applications, how many are pending
the interviews and all that.
And then we have one for Colon did.
So you are El Primer where we can remove the job as well as update the job.
Now what is important, though, is that you place of his stats above the 80.
Because of his stats, string will be treated as the 80.
And of course, when it comes to Eddie Barry's actual value coming from MongoDB, but when it comes
to stats is just a strength as Express is going to be looking for out is going to say, Hey, listen,
there is no job with this particular idea, which stats so very, very important.
Place it above the REIT.
So let's get cracking.
And first, we want to go with jobs controller, and let's set up those functions, and this is going
to be the case where I will copy and paste from the read me just so I can basically see them right away.
So I'll set it up over here.
My apologies.
Here's way I don't like copying pasting.
But this is going to be the case where I'll do that because it will definitely make my life easier,
where I want to go with content and then create job.
That's my function.
We're going to go here with Iraq and rest.
And then I just want to go with Iraq, not sand.
And let's go with the name all the functions.
So create a job.
Now, before we copy and paste, you know what?
There's actually one thing missing these.
All are going to be a sink show before I forget that back in the off controller, we want to hear the
same thing, and all of these are going to be a sink because we'll be communicating with our database.
So make sure you do that as well.
And now let's go back here.
Copy and paste.
And then let's change those names around where we are looking for get all jobs.
So that's going to be over here.
So get all and jobs, and I'll change the string as well.
So I'll say get all jobs that we want to, I guess, update the job again.
The order is not really important.
I just always like to set up in the order.
But I might mess up.
So again, not a big deal.
We'll have to work and show stats first and then the job, at least in my opinion, it's not a big deal.
So let's say I'm dead job here.
Then we have a daily job, correct the lead job and then be a job over here or a job.
And then lastly, we have show stats.
So that's the case where you can just show stats and show stats around.
So show stats around.
Let's say it again.
Just so I can speed it up.
Take this entire thing or create the year out.
One, I'll say jobs rather.
Reporter.
Then let's import.
Import, copy and paste from.
And we're looking for the controllers in this case.
And more specifically, we want to get the jobs controller.
We want to add jobs and then write about it.
Let's do the same thing.
We're in the Arthur outs.
We already have the router and I don't see the point of repeating myself.
So let's set it up here in the jobs router.
And then let's wrap our roots one by one.
So we're going to go here and we'll export right away the router or export default and then router,
and then let's set up all our routes as far as the jobs are concerned.
And again, the route one will be create job and get all jobs.
And then the other three are going to be one for start and then two for daddy.
So let's say the router that route, let's set up the route and that will be a post on.
So first one will be post create job and then second will be get around where we want to get all the
jobs.
Pretty typical rest structure.
Then I'll say remember.
About Cohen I.D. and I'll set up my stats, so let's copy and paste, let's move down here.
And this is going to be stored throughout.
It's going to be a get request.
So it's going to be a get.
And we want to run our show stats controller violence and move this one.
And then the last one will be drawn out and we're looking for colon I.D. and then delete.
And for this, one will delete the job and for the actual data, job or update job.
And with this in place now, we're just want to go back to a server and learn right after the fourth
router will pretty much do the same thing where we're looking for jobs throughout.
So jobs over here and mine, where we have the back years instead of off say jobs and vets will become
jobs router.
So now with this in place, we can just check what's happening.
And we have can't find mojo imported from jobs are out.
And, of course, because this one I called Marauder and then this one I called around.
So let me fix that small typo, and I think I'm going to go with jumps roots here.
That just makes a little bit more sense since the folder name is around and it looks like have no bugs.
So now we can hop over to a postman and test it out, whether we are getting all our dummy rulers.