1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Simplify example https settings

This commit is contained in:
Nick O'Leary 2020-06-25 20:10:26 +01:00
parent 3b7348f862
commit d47906b525
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -14,10 +14,6 @@
* limitations under the License. * limitations under the License.
**/ **/
// The `https` setting requires the `fs` module. Uncomment the following
// to make it available:
//var fs = require("fs");
module.exports = { module.exports = {
// the tcp port that the Node-RED web server is listening on // the tcp port that the Node-RED web server is listening on
uiPort: process.env.PORT || 1880, uiPort: process.env.PORT || 1880,
@ -139,28 +135,22 @@ module.exports = {
// The following property can be used to enable HTTPS // The following property can be used to enable HTTPS
// See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
// for details on its contents. // 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, // This property can be either an object, containing both a (private) key and a (public) certificate,
// or a function that returns such an object: // or a function that returns such an object:
//// https object: //// https object:
//https: { //https: {
// key: fs.readFileSync('privkey.pem'), // key: require("fs").readFileSync('privkey.pem'),
// cert: fs.readFileSync('cert.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 { // return {
// key: fs.readFileSync('privkey.pem'), // key: require("fs").readFileSync('privkey.pem'),
// cert: fs.readFileSync('cert.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 // The following property can be used to refresh the https settings at a
// regular time interval in hours. // regular time interval in hours.