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 Express Basics Using Templates with Express Using Pug in Your Express App

Stephanie De La Melena
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Stephanie De La Melena
Full Stack JavaScript Techdegree Graduate 14,507 Points

How do we make the index.pug folder appear on the web?

I think I must've missed something, but when creating an index.pug file, I am not sure how the instructor made it appear on the web. If someone could please let me know, that would be great!

1 Answer

Steven Parker
Steven Parker
216,812 Points

It's not actually "on the web", it's just appearing in a browser running on the same machine. If you have the same configuration as the instructor, you should see the same thing by directing your browser to localhost:3000.

Stephanie De La Melena
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Stephanie De La Melena
Full Stack JavaScript Techdegree Graduate 14,507 Points

Oh I see, I do remember him putting something in the terminal for it to spit out something similar in the past, unfortunately the localhost:3000 doesn't work for me, but I'll see what video he explained this in and will include an answer if I find it.

Steven Parker
Steven Parker
216,812 Points

The setup to respond to the browser is done with the express method app.listen, which you can see being used in the code shown earlier in this same video (at about 1:10).