From 15f97bbf26a90ae1c691f902d2c4467f5bbe6b09 Mon Sep 17 00:00:00 2001 From: bartbutenaers Date: Mon, 11 May 2020 23:29:38 +0200 Subject: [PATCH] Asynchronous https support --- packages/node_modules/node-red/settings.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/node-red/settings.js b/packages/node_modules/node-red/settings.js index 8be7bf9bd..3195f70ef 100644 --- a/packages/node_modules/node-red/settings.js +++ b/packages/node_modules/node-red/settings.js @@ -145,13 +145,20 @@ module.exports = { // key: fs.readFileSync('privkey.pem'), // cert: fs.readFileSync('cert.pem') //}, - // This property can also be a function (e.g. to automatic refresh the https settings): + // This property can also be a function (e.g. to automatic refresh the https settings synchronously): //https: function() { // return { // key: fs.readFileSync('privkey.pem'), // cert: fs.readFileSync('cert.pem') // } //}, + // This property can also be a promise (e.g. to automatic refresh the https settings asynchronously): + //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 regular time intervals (seconds). // Prerequisite: the 'https' property should be enabled (based on a function)!