- /** Option 2: function that returns the HTTP configuration object */
- // https: function() {
- // // This function should return the options object, or a Promise
- // // that resolves to the options object
- // return {
- // key: require("fs").readFileSync('privkey.pem'),
- // cert: require("fs").readFileSync('cert.pem')
- // }
- // },
-
- /** If the `https` setting is a function, the following setting can be used
- * to set how often, in hours, the function will be called. That can be used
- * to refresh any certificates.
- */
- //httpsRefreshInterval : 12,
-
- /** The following property can be used to cause insecure HTTP connections to
- * be redirected to HTTPS.
- */
- //requireHttps: true,
-
- /** To password protect the node-defined HTTP endpoints (httpNodeRoot),
- * including node-red-dashboard, or the static content (httpStatic), the
- * following properties can be used.
- * The `pass` field is a bcrypt hash of the password.
- * See http://nodered.org/docs/security.html#generating-the-password-hash
- */
- //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
- //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
-
-/*******************************************************************************
- * Server Settings
- * - uiPort
- * - uiHost
- * - apiMaxLength
- * - httpServerOptions
- * - httpAdminRoot
- * - httpAdminMiddleware
- * - httpNodeRoot
- * - httpNodeCors
- * - httpNodeMiddleware
- * - httpStatic
- * - httpStaticRoot
- ******************************************************************************/
-
- /** the tcp port that the Node-RED web server is listening on */
- 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",
-
- /** The maximum size of HTTP request that will be accepted by the runtime api.
- * Default: 5mb
- */
- //apiMaxLength: '5mb',
-
- /** The following property can be used to pass custom options to the Express.js
- * server used by Node-RED. For a full list of available options, refer
- * to http://expressjs.com/en/api.html#app.settings.table
- */
- //httpServerOptions: { },
-
- /** By default, the Node-RED UI is available at http://localhost:1880/
- * The following property can be used to specify a different root path.
- * If set to false, this is disabled.
- */
- //httpAdminRoot: '/admin',
-
- /** The following property can be used to add a custom middleware function
- * in front of all admin http routes. For example, to set custom http
- * headers. It can be a single function or an array of middleware functions.
- */
- // httpAdminMiddleware: function(req,res,next) {
- // // Set the X-Frame-Options header to limit where the editor
- // // can be embedded
- // //res.set('X-Frame-Options', 'sameorigin');
- // next();
- // },
-
-
- /** Some nodes, such as HTTP In, can be used to listen for incoming http requests.
- * By default, these are served relative to '/'. The following property
- * can be used to specifiy a different root path. If set to false, this is
- * disabled.
- */
- //httpNodeRoot: '/red-nodes',
-
- /** The following property can be used to configure cross-origin resource sharing
- * in the HTTP nodes.
- * See https://github.com/troygoode/node-cors#configuration-options for
- * details on its contents. The following is a basic permissive set of options:
- */
- //httpNodeCors: {
- // origin: "*",
- // methods: "GET,PUT,POST,DELETE"
- //},
-
- /** If you need to set an http proxy please set an environment variable
- * called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
- * For example - http_proxy=http://myproxy.com:8080
- * (Setting it here will have no effect)
- * You may also specify no_proxy (or NO_PROXY) to supply a comma separated
- * list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
- */
-
- /** The following property can be used to add a custom middleware function
- * in front of all http in nodes. This allows custom authentication to be
- * applied to all http in nodes, or any other sort of common request processing.
- * It can be a single function or an array of middleware functions.
- */
- //httpNodeMiddleware: function(req,res,next) {
- // // Handle/reject the request, or pass it on to the http in node by calling next();
- // // Optionally skip our rawBodyParser by setting this to true;
- // //req.skipRawBodyParser = true;
- // next();
- //},
-
- /** When httpAdminRoot is used to move the UI to a different root path, the
- * following property can be used to identify a directory of static content
- * that should be served at http://localhost:1880/.
- * When httpStaticRoot is set differently to httpAdminRoot, there is no need
- * to move httpAdminRoot
- */
- //httpStatic: '/home/nol/node-red-static/', //single static source
- /* OR multiple static sources can be created using an array of objects... */
- //httpStatic: [
- // {path: '/home/nol/pics/', root: "/img/"},
- // {path: '/home/nol/reports/', root: "/doc/"},
- //],
-
- /**
- * All static routes will be appended to httpStaticRoot
- * e.g. if httpStatic = "/home/nol/docs" and httpStaticRoot = "/static/"
- * then "/home/nol/docs" will be served at "/static/"
- * e.g. if httpStatic = [{path: '/home/nol/pics/', root: "/img/"}]
- * and httpStaticRoot = "/static/"
- * then "/home/nol/pics/" will be served at "/static/img/"
- */
- //httpStaticRoot: '/static/',
-
-/*******************************************************************************
- * Runtime Settings
- * - lang
- * - runtimeState
- * - diagnostics
- * - logging
- * - contextStorage
- * - exportGlobalContextKeys
- * - externalModules
- ******************************************************************************/
-
- /** Uncomment the following to run node-red in your preferred language.
- * Available languages include: en-US (default), ja, de, zh-CN, zh-TW, ru, ko
- * Some languages are more complete than others.
- */
- // lang: "de",
-
- /** Configure diagnostics options
- * - enabled: When `enabled` is `true` (or unset), diagnostics data will
- * be available at http://localhost:1880/diagnostics
- * - ui: When `ui` is `true` (or unset), the action `show-system-info` will
- * be available to logged in users of node-red editor
- */
- diagnostics: {
- /** enable or disable diagnostics endpoint. Must be set to `false` to disable */
- enabled: true,
- /** enable or disable diagnostics display in the node-red editor. Must be set to `false` to disable */
- ui: true,
+ /** Option 2: function that returns the HTTP configuration object */
+ // https: function() {
+ // // This function should return the options object, or a Promise
+ // // that resolves to the options object
+ // return {
+ // key: require("fs").readFileSync('privkey.pem'),
+ // cert: require("fs").readFileSync('cert.pem')
+ // }
+ // },
+
+ /** If the `https` setting is a function, the following setting can be used
+ * to set how often, in hours, the function will be called. That can be used
+ * to refresh any certificates.
+ */
+ //httpsRefreshInterval : 12,
+
+ /** The following property can be used to cause insecure HTTP connections to
+ * be redirected to HTTPS.
+ */
+ //requireHttps: true,
+
+ /** To password protect the node-defined HTTP endpoints (httpNodeRoot),
+ * including node-red-dashboard, or the static content (httpStatic), the
+ * following properties can be used.
+ * The `pass` field is a bcrypt hash of the password.
+ * See http://nodered.org/docs/security.html#generating-the-password-hash
+ */
+ //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
+ //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
+
+ /*******************************************************************************
+ * Server Settings
+ * - uiPort
+ * - uiHost
+ * - apiMaxLength
+ * - httpServerOptions
+ * - httpAdminRoot
+ * - httpAdminMiddleware
+ * - httpNodeRoot
+ * - httpNodeCors
+ * - httpNodeMiddleware
+ * - httpStatic
+ * - httpStaticRoot
+ ******************************************************************************/
+
+ /** the tcp port that the Node-RED web server is listening on */
+ 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",
+
+ /** The maximum size of HTTP request that will be accepted by the runtime api.
+ * Default: 5mb
+ */
+ //apiMaxLength: '5mb',
+
+ /** The following property can be used to pass custom options to the Express.js
+ * server used by Node-RED. For a full list of available options, refer
+ * to http://expressjs.com/en/api.html#app.settings.table
+ */
+ //httpServerOptions: { },
+
+ /** By default, the Node-RED UI is available at http://localhost:1880/
+ * The following property can be used to specify a different root path.
+ * If set to false, this is disabled.
+ */
+ //httpAdminRoot: '/admin',
+
+ /** The following property can be used to add a custom middleware function
+ * in front of all admin http routes. For example, to set custom http
+ * headers. It can be a single function or an array of middleware functions.
+ */
+ // httpAdminMiddleware: function(req,res,next) {
+ // // Set the X-Frame-Options header to limit where the editor
+ // // can be embedded
+ // //res.set('X-Frame-Options', 'sameorigin');
+ // next();
+ // },
+
+
+ /** Some nodes, such as HTTP In, can be used to listen for incoming http requests.
+ * By default, these are served relative to '/'. The following property
+ * can be used to specify a different root path. If set to false, this is
+ * disabled.
+ */
+ //httpNodeRoot: '/red-nodes',
+
+ /** The following property can be used to configure cross-origin resource sharing
+ * in the HTTP nodes.
+ * See https://github.com/troygoode/node-cors#configuration-options for
+ * details on its contents. The following is a basic permissive set of options:
+ */
+ //httpNodeCors: {
+ // origin: "*",
+ // methods: "GET,PUT,POST,DELETE"
+ //},
+
+ /** If you need to set an http proxy please set an environment variable
+ * called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
+ * For example - http_proxy=http://myproxy.com:8080
+ * (Setting it here will have no effect)
+ * You may also specify no_proxy (or NO_PROXY) to supply a comma separated
+ * list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
+ */
+
+ /** The following property can be used to add a custom middleware function
+ * in front of all http in nodes. This allows custom authentication to be
+ * applied to all http in nodes, or any other sort of common request processing.
+ * It can be a single function or an array of middleware functions.
+ */
+ //httpNodeMiddleware: function(req,res,next) {
+ // // Handle/reject the request, or pass it on to the http in node by calling next();
+ // // Optionally skip our rawBodyParser by setting this to true;
+ // //req.skipRawBodyParser = true;
+ // next();
+ //},
+
+ /** When httpAdminRoot is used to move the UI to a different root path, the
+ * following property can be used to identify a directory of static content
+ * that should be served at http://localhost:1880/.
+ * When httpStaticRoot is set differently to httpAdminRoot, there is no need
+ * to move httpAdminRoot
+ */
+ //httpStatic: '/home/nol/node-red-static/', //single static source
+ /* OR multiple static sources can be created using an array of objects... */
+ //httpStatic: [
+ // {path: '/home/nol/pics/', root: "/img/"},
+ // {path: '/home/nol/reports/', root: "/doc/"},
+ //],
+
+ /**
+ * All static routes will be appended to httpStaticRoot
+ * e.g. if httpStatic = "/home/nol/docs" and httpStaticRoot = "/static/"
+ * then "/home/nol/docs" will be served at "/static/"
+ * e.g. if httpStatic = [{path: '/home/nol/pics/', root: "/img/"}]
+ * and httpStaticRoot = "/static/"
+ * then "/home/nol/pics/" will be served at "/static/img/"
+ */
+ //httpStaticRoot: '/static/',
+
+ /*******************************************************************************
+ * Runtime Settings
+ * - lang
+ * - runtimeState
+ * - diagnostics
+ * - logging
+ * - contextStorage
+ * - exportGlobalContextKeys
+ * - externalModules
+ ******************************************************************************/
+
+ /** Uncomment the following to run node-red in your preferred language.
+ * Available languages include: en-US (default), ja, de, zh-CN, zh-TW, ru, ko
+ * Some languages are more complete than others.
+ */
+ // lang: "de",
+
+ /** Configure diagnostics options
+ * - enabled: When `enabled` is `true` (or unset), diagnostics data will
+ * be available at http://localhost:1880/diagnostics
+ * - ui: When `ui` is `true` (or unset), the action `show-system-info` will
+ * be available to logged in users of node-red editor
+ */
+ diagnostics: {
+ /** enable or disable diagnostics endpoint. Must be set to `false` to disable */
+ enabled: true,
+ /** enable or disable diagnostics display in the node-red editor. Must be set to `false` to disable */
+ ui: true,
+ },
+ /** Configure runtimeState options
+ * - enabled: When `enabled` is `true` flows runtime can be Started/Stoped
+ * by POSTing to available at http://localhost:1880/flows/state
+ * - ui: When `ui` is `true`, the action `core:start-flows` and
+ * `core:stop-flows` will be available to logged in users of node-red editor
+ * Also, the deploy menu (when set to default) will show a stop or start button
+ */
+ runtimeState: {
+ /** enable or disable flows/state endpoint. Must be set to `false` to disable */
+ enabled: false,
+ /** show or hide runtime stop/start options in the node-red editor. Must be set to `false` to hide */
+ ui: false,
+ },
+ /** Configure the logging output */
+ logging: {
+ /** Only console logging is currently supported */
+ console: {
+ /** Level of logging to be recorded. Options are:
+ * fatal - only those errors which make the application unusable should be recorded
+ * error - record errors which are deemed fatal for a particular request + fatal errors
+ * warn - record problems which are non fatal + errors + fatal errors
+ * info - record information about the general running of the application + warn + error + fatal errors
+ * debug - record information which is more verbose than info + info + warn + error + fatal errors
+ * trace - record very detailed logging + debug + info + warn + error + fatal errors
+ * off - turn off all logging (doesn't affect metrics or audit)
+ */
+ level: 'off',
+ /** Whether or not to include metric events in the log output */
+ metrics: false,
+ /** Whether or not to include audit events in the log output */
+ audit: false