Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Build a Simple Dynamic Site with Node.js Handling Routes in Node.js Populating User Information

Jason S
Jason S
16,247 Points

Where does JSON get data from?

hi in these videos the JSON data is always already there, but where does that data come from? would there ever be a tutorial for that?

2 Answers

Nathan Heffley
Nathan Heffley
19,878 Points

The Profile module is where the JSON data comes from. The Profile module connects to Treehouse's public API and retrieves the information on the requested student.

A slightly more simple version of profile.js that you find in this course was actually written in the Node.JS basics course which you can find here on Treehouse in the Javascript section. I highly recommend working through that entire course before returning to this one so you can understand the basics of Node.JS.

Kelly von Borstel
Kelly von Borstel
28,880 Points

Hi, Jason. One place you might get JSON data is from an API. Here's a blog post about getting data from a public API. http://themarklee.com/2014/04/03/pulling-json-data-open-data-api/