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

Cameron Raw
Cameron Raw
15,473 Points

In what directory is localhost?

Hi, I'm trying to implement what I've learnt on the node.js course into my own project, which involves html files etc. If I'm using the http server as shown in the course only locally, where should I be saving my other project files?

1 Answer

Steven Parker
Steven Parker
231,271 Points

:point_right: The top-level directory would be the one you start the server running in.

Cameron Raw
Cameron Raw
15,473 Points

Thanks. My css, img and js files aren't working now that I'm trying to use localhost. I've always developed in a normal file directory and used relative linking to get things working in the past. Is there anywhere I can go to understand how to load content from existing files easily please?