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 trialSiim Kustassoo
13,587 PointsIs this video / module deprecated?
I see most questions from few years ago and the Node code is different on webpage?
- Is there point to follow it to the details or rather just to get the big picture?
2 Answers
Lee Vaughn
Treehouse TeacherHi Siim Kustassoo!
Did you have any problem coding along with the lesson? Not quite sure what you mean by the Node code on the page looking different but when I download the project files for this point in the lesson and run them it seems to work fine.
If you continue to have trouble please share some more details as to the specific problem(s) you are running into along with either a Snapshot of your Workspace (the camera icon towards the top right) or a link to a GitHub repo so that we can see and test your code.
Thanks!
Lee Vaughn
Treehouse TeacherHi Siim Kustassoo!
Code is ever-evolving so there are frequent new methods or new approaches added. Unless something is specifically depreciated this typically means that you simply have more options for how to do things. There can also be subtle differences so two things that might seem the same might actually be slightly different or serve slightly different purposes.
writeHead() vs setHeader() is a good example of this. You can check out the answer to this question for a nice breakdown of the small difference between these two: https://stackoverflow.com/questions/28094192/difference-between-response-setheader-and-response-writehead
It doesn't appear that any of the methods/approaches shown in this course are depreciated and the code all seems to work as expected so it is all still great stuff to learn.
Siim Kustassoo
13,587 PointsSiim Kustassoo
13,587 PointsHi. My question was regarding the node syntax. This whole video is based on the syntax shown/copied from Node.js webpage. Visiting at this time the server creation syntax is different and has some specifics that do not seem to match with what is going on in the video.
Ex: res.writeHead(); in the video vs res.setHeader(); and res.statusCode(); from the current node.js webpage.
I would like not to learn some fundamentally old syntax that I need to soon relearn. My question is that, is it still valid to learn everything from these videos detail by detail or rather just to grasp the bigger picture.
Samuel Kleos
Front End Web Development Techdegree Student 13,728 PointsSamuel Kleos
Front End Web Development Techdegree Student 13,728 PointsCan you try running the code again, I seem to be having trouble with the project files.