some updates?
This commit is contained in:
10
bin/www
10
bin/www
@@ -4,7 +4,7 @@ var app = require("../app");
|
||||
var http = require("http");
|
||||
|
||||
// Define a port for the server to listen on
|
||||
var port = process.env.PORT || 4000;
|
||||
var port = 4000;
|
||||
app.set("port", port);
|
||||
|
||||
// Create a server instance
|
||||
@@ -17,16 +17,16 @@ server.listen(port);
|
||||
server.on("error", onError);
|
||||
server.on("listening", onListening);
|
||||
|
||||
function pipeOrPort(address) {
|
||||
/* function pipeOrPort(address) {
|
||||
return typeof address == "string" ? `pipe ${address}` : `port ${address.port}`;
|
||||
}
|
||||
} */
|
||||
|
||||
function onError(error) {
|
||||
if (error.syscall != "listen") {
|
||||
throw error;
|
||||
}
|
||||
|
||||
let bind = pipeOrPort(server.address());
|
||||
let bind = 4000;//pipeOrPort(server.address());
|
||||
|
||||
switch (error.code) {
|
||||
case "EACCES":
|
||||
@@ -41,6 +41,6 @@ function onError(error) {
|
||||
}
|
||||
|
||||
function onListening() {
|
||||
let bind = pipeOrPort(server.address());
|
||||
let bind = 4000;//pipeOrPort(server.address());
|
||||
console.log(`Listening on ${bind}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user