I\'m an amateur learning to build with node.js. I\'ve been following a tutorial to create my first node.js app. It worked perfectly until I entered \'npm start\'. The log is:>
In my case I simply moved the normalizePort function before the function was called. This was in coffeescript but I've converted it to javascript here.
normalizePort = function(val) {
var port;
var port;
port = parseInt(val, 10);
if (isNaN(port)) {
return val;
}
if (port >= 0) {
return port;
}
return false;
};
port = normalizePort(process.env.PORT || '4000');