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 HTTP Methods and Headers Perfection Suggestions

Why do you need Node.js to create Lorem Ipsum generator site?

Is there any compelling reason why you would want to use server-side language to create a Lorem Ipsum generator site? I'm sure you can make it using only the client-side programming. For example, if you host the generator site in Github, you can't use Node.js but you can still provide the generator using only front-end technique. It may require less bandwidth(?) and faster(?). If you host it in heroku or digital ocean, first of all it costs money. Second of all, it takes more bandwidth and computation burden on a server because you make a request call every singe time you generate.

Maybe I am wrong. Could anybody explain it?

1 Answer

Steven Parker
Steven Parker
231,248 Points

It's very common for there to be multiple ways of creating a particular solution. I don't think the course means to imply that a server-side generator is the only solution. But since the result can be achieved that way, it serves as an example suitable for the objective of the course, which is to teach the skills needed for constructing such a process.

In an actual situation, concerns such as cost, value, and efficiency would be weighed early on before deciding on the implementation strategy. And in some cases a front-end solution may indeed be more practical.

J llama
J llama
12,631 Points

Yes it is a bit confusing to me as to why were using node here when we are not connecting to any api to grab data?