remove listen on port 3000
This commit is contained in:
parent
511b39a65e
commit
e13dcdcb8b
30
bin/www
30
bin/www
@ -12,8 +12,8 @@ var http = require('http');
|
|||||||
* Get port from environment and store in Express.
|
* Get port from environment and store in Express.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var port = normalizePort(process.env.PORT || '3000');
|
// var port = normalizePort(process.env.PORT || '3000');
|
||||||
app.set('port', port);
|
// app.set('port', port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create HTTP server.
|
* Create HTTP server.
|
||||||
@ -25,7 +25,7 @@ var server = http.createServer(app);
|
|||||||
* Listen on provided port, on all network interfaces.
|
* Listen on provided port, on all network interfaces.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
server.listen(port);
|
//server.listen(port);
|
||||||
server.on('error', onError);
|
server.on('error', onError);
|
||||||
server.on('listening', onListening);
|
server.on('listening', onListening);
|
||||||
|
|
||||||
@ -33,21 +33,21 @@ server.on('listening', onListening);
|
|||||||
* Normalize a port into a number, string, or false.
|
* Normalize a port into a number, string, or false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function normalizePort(val) {
|
// function normalizePort(val) {
|
||||||
var port = parseInt(val, 10);
|
// var port = parseInt(val, 10);
|
||||||
|
|
||||||
if (isNaN(port)) {
|
// if (isNaN(port)) {
|
||||||
// named pipe
|
// // named pipe
|
||||||
return val;
|
// return val;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (port >= 0) {
|
// if (port >= 0) {
|
||||||
// port number
|
// // port number
|
||||||
return port;
|
// return port;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event listener for HTTP server "error" event.
|
* Event listener for HTTP server "error" event.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user