You often see example hello world code for Node that creates an Http Server, starts listening on a port, then followed by something along the lines of:
console.log('Server is listening on port 8000');
But ideally you'd want this instead:
console.log('Server is listening on port ' + server.port);
How do I retrieve the port the server is currently listening on without storing the number in a variable prior to calling server.listen()?