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 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,578 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
231,248 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,578 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
231,248 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).