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 Build a Simple Dynamic Site with Node.js Creating a Simple Server in Node.js Creating a Simple Server

fredyrosales
fredyrosales
10,572 Points

Is everything outdated?

So far this Node course hasn't been running smoothly like other courses. Anyone recommend onther course i can take instead of node?? Seems like TreeHouse should update the Node courses.

5 Answers

Yeah.... I don't think it isn't really wrong, though... just a bit messy.

In this specific video, nodejs.org changed their home page so it doesn't have that specific example. Similar code can be found here: https://nodejs.org/api/synopsis.html

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

We're working on a refresh for the Node.js content now. Be sure to check the teacher's notes from any diversions from the videos.

Daniel Nuttall
Daniel Nuttall
5,676 Points

HI Andrew, Just wondering if you might be able to give an estimated timeframe on when the refreshed content might be available?

I did email and ask support but they seemed to think everything was up to date however I am seeing some big differences when jumping between the course and Node.js docs.

Hi Daniel,

Thank you for reaching out! Our Node.js courses have been updated the most recent version :) Please do let us know if you have any other questions!

Best, Kara

Andrew Chalkley
Andrew Chalkley
Treehouse Guest Teacher

Hey Daniel,

Node.js Basics is coming out in January. Keep an eye on the Roadmap as we get more solid timelines for the rest.

Regards
Andrew

Carlos Lantigua
Carlos Lantigua
5,938 Points

Struggled for a bit to get this working while still using the current code on the NodeJS site. This is what I came up with, works similar to Andrews code towards the end.

//1. Create a web Server
const http = require('http');

const port = 3000;

const server = http.createServer((request, response) => {
  response.statusCode = 200;
  response.setHeader('Content-Type', 'text/plain');
  setInterval(function(){
      response.write(new Date() + "\n");
  }, 1000);
});

server.listen(port, () => {
  console.log(`Server running at http://<workspace-url>/`);
});
fredyrosales
fredyrosales
10,572 Points

Yeah i actually just went ahead and made it through the mess!

So, is the new Node.js course out?