update settings comments to describe how to setup for ipv6 (#1675)

* change default server bind to support ipv6 and ipv4

to close #1674

* Add comment re ipv6 so folk know it's capable

* slightly more words re ipv6 config

* Leave defaults as ipv4 but add doc to settings
This commit is contained in:
Dave Conway-Jones 2018-05-01 12:43:10 +01:00 committed by Nick O'Leary
parent 3190de873e
commit e691351976
2 changed files with 3 additions and 2 deletions

4
red.js
View File

@ -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;

View File

@ -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",