diff --git a/packages/node_modules/node-red/settings.js b/packages/node_modules/node-red/settings.js index 1941b8fdc..f3c93f5e8 100644 --- a/packages/node_modules/node-red/settings.js +++ b/packages/node_modules/node-red/settings.js @@ -14,10 +14,6 @@ * limitations under the License. **/ -// The `https` setting requires the `fs` module. Uncomment the following -// to make it available: -//var fs = require("fs"); - module.exports = { // the tcp port that the Node-RED web server is listening on uiPort: process.env.PORT || 1880, @@ -139,28 +135,22 @@ module.exports = { // The following property can be used to enable HTTPS // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener // for details on its contents. - // See the comment at the top of this file on how to load the `fs` module used by this setting. // This property can be either an object, containing both a (private) key and a (public) certificate, // or a function that returns such an object: //// https object: //https: { - // key: fs.readFileSync('privkey.pem'), - // cert: fs.readFileSync('cert.pem') + // key: require("fs").readFileSync('privkey.pem'), + // cert: require("fs").readFileSync('cert.pem') //}, - ////https synchronous function: - //https: function() { + ////https function: + // https: function() { + // // This function should return the options object, or a Promise + // // that resolves to the options object // return { - // key: fs.readFileSync('privkey.pem'), - // cert: fs.readFileSync('cert.pem') + // key: require("fs").readFileSync('privkey.pem'), + // cert: require("fs").readFileSync('cert.pem') // } - //}, - //// https asynchronous function: - //https: function() { - // return Promise.resolve({ - // key: fs.readFileSync('privkey.pem'), - // cert: fs.readFileSync('cert.pem') - // }); - //}, + // }, // The following property can be used to refresh the https settings at a // regular time interval in hours.