Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Chris Shaffer
Chris Shaffer
12,029 Points

Re: Node.js Basics and use in a Web app

This is more of an inquiry and thinking-out-loud question that a need for help.

I'm curious, after taking the Node.js Basics course, if it's possible to simply parse the returned data and display this on a web page.

I don't see any reason why not, just curious as this is the first time I've really dug into Node.

It would seem easy enough to use a button or other input on a page to call the function to retrieve user stats, then parse the return to usable page strings.

Obviously, this is the direction you're going with this course, and obviously this data is displayed ON Treehouse, but I'm wondering if there is a missing step, or if I can simply write the proper interface and display my API results.

Thanks!

1 Answer

I believe the new Node.js course Build a Simple Dynamic Site with Node.js has a section on HTML templating, which will involve getting the data/results and displaying it in a particular way on a HTML page.

Usually the other side of that is having HTML to create forms and manipulate the data stored on the server or in a database.

Does that sound like what you're looking for?

Express is the other thing that is commonly used with Node.js for displaying content on the front-end. They describe it as follows:

Fast, unopinionated, minimalist web framework for Node.js