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
Let's put the concepts we've learned into practice by building a very simple REST API!
Nodemon has been included as a dependancy in the project files, but see this resource for installing nodemon globally.
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
with HTML, a REST-ful API responds with
data, most of the time a JSON object.
0:00
To see how this works,
0:00
let's write a simple route that
responds to a GET request with JSON.
0:02
To follow along with me, download the
starter files from the link on this page.
0:06
Locate the project folder
from the terminal and
0:11
run npm install,
to install the project's dependencies.
0:13
Then open the starter files in
your preferred text editor.
0:17
We're starting off with some standard
files for a basic Express app.
0:20
Along with a file called records.js,
and a file called data.json,
0:24
both of which we'll discuss very soon.
0:28
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