Now that we've put together this kind of demonstration root handler inside of our current user dot TSA
file we're gonna make one or two small changes to it and then duplicate the setup to the other three
route handling files that we already put together.
The first thing I'm going to do is add in the arguments to the callback function so rec and rez and
then inside up here I'm going to put together the same implementation we had a little bit ago.
So I'll do a resort send of hi there like so
OK.
So let's now take this configuration or this code we're going to copy paste it over to a sign in sign
out and sign up will then change on the different routes just to make sure that they all correspond
to different routes so we had specified over in this diagram it's going to take everything inside of
you're going to copy it.
I'm going to go first to sign in and paste it and then save I'll go to sign out and paste and then save
it then I'll go to sign up and paste and save and then going to close.
Current user I'm going to close indexed dot T.S. and we're going to update sign in sign out and sign
up one by one in each these we're just gonna make sure that they have the appropriate routes and the
appropriate method as well.
So going to first begin inside of signing dot to yes inside of you're going to change the routes to
API users sign in we'll change the method to be a post and then I'll change the name of the router down
here at the bottom as well I'll change that to sign in router I'll then save this file and close it.
Next up is sign out.
So inside of sign out we will change this to a post request to API users sign out so I'll take it to
a post API users sign out and then finally I'm going to update the name of the router at the bottom
those sign out router and then finally over to sign up dot.
Yes so this one should be a post request to API users sign up a post API users sign up and then very
similarly I will update the name of the router at the bottom as well so sign up router All right.
So we've got a little bit of scaffolding put together for all for these files.
Let's now go and associate each these different routers with our Express application back inside the
index dot ts file tobacco over here right after our current user router imports I'll add an import for
sign in router from routes sign in then sign out router
and finally sign up router
I'll then make sure that I associate each of those routers with our Express application right after
the current user 1 we put together down there so we'll do an app dot use sign in router and app dot
use sign out router and an app dot use sign up router we're going to be doing a lot of steps like what
we just did between the last video and this one throughout the rest of this application where we create
a set of files together and then put some similar scaffolding into each of them.
The reason for this is that a lot of the code that we're going to end up writing is going to be unfortunately
a little bit similar to each other I suppose.
Now I wanna make sure that we save as much as time as possible because honestly we have a incredible
really an incredible amount of code to write for this application.
Way more than you would ever expect.
I just wanna make sure that this all gets together in a very formulaic fashion with as few mistakes
and typos as possible.
That's really easy to do if we just go through and kind of scaffold all this stuff in one go.
So it looks pretty good because right here continue in just a minute.