diff --git a/red.js b/red.js index 83589edd5..c7dc8b131 100755 --- a/red.js +++ b/red.js @@ -192,7 +192,7 @@ try { if (err.code == "unsupported_version") { console.log("Unsupported version of node.js:",process.version); console.log("Node-RED requires node.js v4 or later"); - } else if (err.code == "not_built") { + } else if (err.code == "not_built") { console.log("Node-RED has not been built. See README.md for details"); } else { console.log("Failed to start server:"); @@ -276,7 +276,7 @@ function getListenPath() { } var listenPath = 'http'+(settings.https?'s':'')+'://'+ - (settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost)+ + (settings.uiHost == '::'?'localhost':(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost))+ ':'+port; if (settings.httpAdminRoot !== false) { listenPath += settings.httpAdminRoot; diff --git a/settings.js b/settings.js index c3bd898ec..0438dc5ea 100644 --- a/settings.js +++ b/settings.js @@ -23,6 +23,7 @@ module.exports = { uiPort: process.env.PORT || 1880, // By default, the Node-RED UI accepts connections on all IPv4 interfaces. + // To listen on all IPv6 addresses, set uiHost to "::", // The following property can be used to listen on a specific interface. For // example, the following would only allow connections from the local machine. //uiHost: "127.0.0.1",