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 Handling Routes in Node.js Home Route

I can't preview using localhost:3000. "This site can’t be reached localhos refused to connect."

I do get the "Server running on http://<workspace-url>/". If I use the eye icon and choose 3000 then I get a page that says: Workspace Unavailable This is a preview link for a Treehouse Workspace that is not currently active.

If you are the workspace owner, you can launch it again via the Treehouse site.

Mark Casavantes
Mark Casavantes
2,867 Points

Good Morning Kylie,

May I suggest you copy your code into codepen.io and run it there. Click on the red circles with an exclamation mark to locate errors. Codepen.io is free.

I hope this is helpful.

1 Answer

I tried CodePen since I also have issues, but Codepen does NOT recognize the "require" keyword. Think that's more NodeJS. Couldn't find if you can run Node JS in CodePen though...