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.


Juan García
Juan García
10,721 Points

Trouble previewing a Node.js application on Workspaces

I'm currently going through the "Build a dynamic site with Node.js" course. Following the instructions step by step, I have no problem running the server on node and previewing the results returned by the app. Of course, when I make a request to "https://teamtreehouse.com/myusername", I receive a warning that the user has been moved permanently.

I am aware that treehouse has now moved the API to https, so I go ahead and change every http method to https (keeping http for status codes). The problem is, the preview then doesn't display the results requested, but a warning:

"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."

Here's a snapshot of my code (it's basically the code provided for by Andrew, with the changes to the http methods: https://w.trhou.se/265ai7uns5

I don't know if I'm doing something wrong, or if maybe the exercise is now outdated?Anyway, it's quite frustrating, I try to keep going with the course but it's hard without being able to see the results of my work!

Any advice? Thanks a lot!

1 Answer

Steven Parker
Steven Parker
216,120 Points

Be aware that the URL of a workspace changes every time you launch it. Any reference to the workspace URL in your code will need to be updated every session.