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 Node.js Basics!
You have completed Node.js Basics!
Preview
Check out my solution for the first part of the challenge.
This video doesn't have any notes.
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
First, we'll need to require the HTTPS
module so that we can use our get request.
0:00
We'll create a function named getDef that
takes a term from the command line to
0:02
search for
from the Merriam Webster Dictionary.
0:06
Now we'll create a request that
uses the dictionary API url,
0:11
including the term interpolated and
ending with the API key.
0:16
Now we'll take the response,
and every time data comes in,
0:22
we'll append the data to
an empty string named body.
0:27
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