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 REST APIs with Express!
You have completed REST APIs with Express!
Preview
In this video we'll learn how to use a module to retrieve information from our datastore.
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
But it doesn't have any hard and
0:00
fast rules about what you do inside
of these methods' callbacks.
0:01
You have the flexibility to
use whatever data store, file,
0:04
database, et cetera that you wanna use.
0:07
At the moment, we've got some hard-coded
data right here in our app.js file,
0:09
which we're sending to the client
when a request is made.
0:14
This is not ideal, because it's likely
to become unwieldy as our project grows.
0:17
So instead, we'll keep the data
in its own file, data.json.
0:22
So let's delete the data in app.js.
0:26
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