Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Simple Dynamic Site with Node.js!
You have completed Build a Simple Dynamic Site with Node.js!
Preview
In this video we'll handle the home route or the root path on our site.
Node.js APIs Used
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
But it responds the same way, no matter
what path we add to the end of the URL.
0:00
Let's make sure that that doesn't happen
by dealing with the home and user routes.
0:01
So, let's first create a function called
homeRoute.
0:07
[BLANK_AUDIO]
0:13
And we'll wrap all the sudo code that we
wrote for handling the, the home.
0:18
We'll want the request and
0:25
response as parameters.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up