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 trialL Haney
Front End Web Development Techdegree Student 10,263 PointsWhere in the application is the port number specified?
How come localhost:3000 works in the browser? I can't find where in the application the port number is listed.
2 Answers
KRIS NIKOLAISEN
54,971 PointsIf you look in the bin folder in the downloaded project files you'll see a file named www
. Inside starting at line 15
var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
/**
* Create HTTP server.
*/
var server = http.createServer(app);
/**
* Listen on provided port, on all network interfaces.
*/
server.listen(port);
Trevon Allen
7,606 Pointsthanks for that had that same question
L Haney
Front End Web Development Techdegree Student 10,263 PointsL Haney
Front End Web Development Techdegree Student 10,263 PointsThanks!