From d47906b5252a7ef1a146751bbb7a83999e206033 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 25 Jun 2020 20:10:26 +0100 Subject: [PATCH] Simplify example https settings --- packages/node_modules/node-red/settings.js | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) 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.