remove listen on port 3000

This commit is contained in:
Nikola Petrov 2023-07-30 13:39:05 +02:00
parent 511b39a65e
commit e13dcdcb8b

30
bin/www
View File

@ -12,8 +12,8 @@ var http = require('http');
* Get port from environment and store in Express.
*/
var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
// var port = normalizePort(process.env.PORT || '3000');
// app.set('port', port);
/**
* Create HTTP server.
@ -25,7 +25,7 @@ var server = http.createServer(app);
* Listen on provided port, on all network interfaces.
*/
server.listen(port);
//server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
@ -33,21 +33,21 @@ server.on('listening', onListening);
* Normalize a port into a number, string, or false.
*/
function normalizePort(val) {
var port = parseInt(val, 10);
// function normalizePort(val) {
// var port = parseInt(val, 10);
if (isNaN(port)) {
// named pipe
return val;
}
// if (isNaN(port)) {
// // named pipe
// return val;
// }
if (port >= 0) {
// port number
return port;
}
// if (port >= 0) {
// // port number
// return port;
// }
return false;
}
// return false;
// }
/**
* Event listener for HTTP server "error" event.