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 User Route

Trouble viewing the page


I have an issue running app.js in node - the browser looks up in Yahoo instead of showing the html. My code is here:


Many thanks in advance!

2 Answers

Hi Ksenia-

I was able to get a server started by just listing the port. See here:

var http = require('http');
http.createServer(function (request, response) {
  router.home(request, response);
  router.user(request, response);
console.log('Server running at http://workspaceurl:3000');

Are you using Node on Workspaces or your local computer? If you are using on Workspaces, won't work as that is a default local address for a local server.


Hi Greg! I am using console, not the workspace and unfortunately it still doesn't work.

how do we get it on the web page?