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

Ross Kendall-Selwyn
Ross Kendall-Selwyn
12,813 Points

[Solution]One possible reason for code not rendering in browser using localhost

If your code is not rending in the browser it may be because you're not accessing the local host files!

If you have downloaded the course files and are using MAMP/WAMP/XAMMP as your localhost you will need to save the course files in the 'htdocs' file within the the MAMP application files. This is the folder that the apache server looks for files to serve on your domain by default (this can be changed - search youtube or stack overflow for answers.). then to access these files on your local host and see them in your browser you would type http://localhost:888/folder/file

like so:

http://localhost:8888/Treehouse/index.html

I created a folder within htdocs named 'Treehouse' and moved the course files to that folder.

Be sure to access these files within the text editor also so that when you make changes you're editing the file in the htdocs folder.