settings.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /**
  2. * Copyright JS Foundation and other contributors, http://js.foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. **/
  16. // The `https` setting requires the `fs` module. Uncomment the following
  17. // to make it available:
  18. //var fs = require("fs");
  19. module.exports = {
  20. // the tcp port that the Node-RED web server is listening on
  21. uiPort: process.env.PORT || 1880,
  22. // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
  23. // The following property can be used to listen on a specific interface. For
  24. // example, the following would only allow connections from the local machine.
  25. //uiHost: "127.0.0.1",
  26. // Retry time in milliseconds for MQTT connections
  27. mqttReconnectTime: 15000,
  28. // Retry time in milliseconds for Serial port connections
  29. serialReconnectTime: 15000,
  30. // Retry time in milliseconds for TCP socket connections
  31. //socketReconnectTime: 10000,
  32. // Timeout in milliseconds for TCP server socket connections
  33. // defaults to no timeout
  34. //socketTimeout: 120000,
  35. // Timeout in milliseconds for HTTP request connections
  36. // defaults to 120 seconds
  37. //httpRequestTimeout: 120000,
  38. // The maximum length, in characters, of any message sent to the debug sidebar tab
  39. debugMaxLength: 1000,
  40. // To disable the option for using local files for storing keys and certificates in the TLS configuration
  41. // node, set this to true
  42. //tlsConfigDisableLocalFiles: true,
  43. // Colourise the console output of the debug node
  44. //debugUseColors: true,
  45. // The file containing the flows. If not set, it defaults to flows_<hostname>.json
  46. //flowFile: 'flows.json',
  47. // To enabled pretty-printing of the flow within the flow file, set the following
  48. // property to true:
  49. //flowFilePretty: true,
  50. // By default, credentials are encrypted in storage using a generated key. To
  51. // specify your own secret, set the following property.
  52. // If you want to disable encryption of credentials, set this property to false.
  53. // Note: once you set this property, do not change it - doing so will prevent
  54. // node-red from being able to decrypt your existing credentials and they will be
  55. // lost.
  56. //credentialSecret: "a-secret-key",
  57. // By default, all user data is stored in the Node-RED install directory. To
  58. // use a different location, the following property can be used
  59. //userDir: '/home/nol/.node-red/',
  60. // Node-RED scans the `nodes` directory in the install directory to find nodes.
  61. // The following property can be used to specify an additional directory to scan.
  62. //nodesDir: '/home/nol/.node-red/nodes',
  63. // By default, the Node-RED UI is available at http://localhost:1880/
  64. // The following property can be used to specifiy a different root path.
  65. // If set to false, this is disabled.
  66. //httpAdminRoot: '/admin',
  67. // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
  68. // By default, these are served relative to '/'. The following property
  69. // can be used to specifiy a different root path. If set to false, this is
  70. // disabled.
  71. //httpNodeRoot: '/red-nodes',
  72. // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
  73. // to apply the same root to both parts.
  74. //httpRoot: '/red',
  75. // When httpAdminRoot is used to move the UI to a different root path, the
  76. // following property can be used to identify a directory of static content
  77. // that should be served at http://localhost:1880/.
  78. //httpStatic: '/home/nol/node-red-static/',
  79. // The maximum size of HTTP request that will be accepted by the runtime api.
  80. // Default: 5mb
  81. //apiMaxLength: '5mb',
  82. // If you installed the optional node-red-dashboard you can set it's path
  83. // relative to httpRoot
  84. //ui: { path: "ui" },
  85. // Securing Node-RED
  86. // -----------------
  87. // To password protect the Node-RED editor and admin API, the following
  88. // property can be used. See http://nodered.org/docs/security.html for details.
  89. //adminAuth: {
  90. // type: "credentials",
  91. // users: [{
  92. // username: "admin",
  93. // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
  94. // permissions: "*"
  95. // }]
  96. //},
  97. // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
  98. // the static content (httpStatic), the following properties can be used.
  99. // The pass field is a bcrypt hash of the password.
  100. // See http://nodered.org/docs/security.html#generating-the-password-hash
  101. //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
  102. //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
  103. // The following property can be used to enable HTTPS
  104. // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
  105. // for details on its contents.
  106. // See the comment at the top of this file on how to load the `fs` module used by
  107. // this setting.
  108. //
  109. //https: {
  110. // key: fs.readFileSync('privatekey.pem'),
  111. // cert: fs.readFileSync('certificate.pem')
  112. //},
  113. // The following property can be used to cause insecure HTTP connections to
  114. // be redirected to HTTPS.
  115. //requireHttps: true
  116. // The following property can be used to disable the editor. The admin API
  117. // is not affected by this option. To disable both the editor and the admin
  118. // API, use either the httpRoot or httpAdminRoot properties
  119. //disableEditor: false,
  120. // The following property can be used to configure cross-origin resource sharing
  121. // in the HTTP nodes.
  122. // See https://github.com/troygoode/node-cors#configuration-options for
  123. // details on its contents. The following is a basic permissive set of options:
  124. //httpNodeCors: {
  125. // origin: "*",
  126. // methods: "GET,PUT,POST,DELETE"
  127. //},
  128. // If you need to set an http proxy please set an environment variable
  129. // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
  130. // For example - http_proxy=http://myproxy.com:8080
  131. // (Setting it here will have no effect)
  132. // You may also specify no_proxy (or NO_PROXY) to supply a comma separated
  133. // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
  134. // The following property can be used to add a custom middleware function
  135. // in front of all http in nodes. This allows custom authentication to be
  136. // applied to all http in nodes, or any other sort of common request processing.
  137. //httpNodeMiddleware: function(req,res,next) {
  138. // // Handle/reject the request, or pass it on to the http in node by calling next();
  139. // // Optionally skip our rawBodyParser by setting this to true;
  140. // //req.skipRawBodyParser = true;
  141. // next();
  142. //},
  143. // The following property can be used to verify websocket connection attempts.
  144. // This allows, for example, the HTTP request headers to be checked to ensure
  145. // they include valid authentication information.
  146. //webSocketNodeVerifyClient: function(info) {
  147. // // 'info' has three properties:
  148. // // - origin : the value in the Origin header
  149. // // - req : the HTTP request
  150. // // - secure : true if req.connection.authorized or req.connection.encrypted is set
  151. // //
  152. // // The function should return true if the connection should be accepted, false otherwise.
  153. // //
  154. // // Alternatively, if this function is defined to accept a second argument, callback,
  155. // // it can be used to verify the client asynchronously.
  156. // // The callback takes three arguments:
  157. // // - result : boolean, whether to accept the connection or not
  158. // // - code : if result is false, the HTTP error status to return
  159. // // - reason: if result is false, the HTTP reason string to return
  160. //},
  161. // Anything in this hash is globally available to all functions.
  162. // It is accessed as context.global.
  163. // eg:
  164. // functionGlobalContext: { os:require('os') }
  165. // can be accessed in a function block as:
  166. // context.global.os
  167. functionGlobalContext: {
  168. // os:require('os'),
  169. // octalbonescript:require('octalbonescript'),
  170. // jfive:require("johnny-five"),
  171. // j5board:require("johnny-five").Board({repl:false})
  172. },
  173. // The following property can be used to order the categories in the editor
  174. // palette. If a node's category is not in the list, the category will get
  175. // added to the end of the palette.
  176. // If not set, the following default order is used:
  177. //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'],
  178. // Configure the logging output
  179. logging: {
  180. // Only console logging is currently supported
  181. console: {
  182. // Level of logging to be recorded. Options are:
  183. // fatal - only those errors which make the application unusable should be recorded
  184. // error - record errors which are deemed fatal for a particular request + fatal errors
  185. // warn - record problems which are non fatal + errors + fatal errors
  186. // info - record information about the general running of the application + warn + error + fatal errors
  187. // debug - record information which is more verbose than info + info + warn + error + fatal errors
  188. // trace - record very detailed logging + debug + info + warn + error + fatal errors
  189. // off - turn off all logging (doesn't affect metrics or audit)
  190. level: "info",
  191. // Whether or not to include metric events in the log output
  192. metrics: false,
  193. // Whether or not to include audit events in the log output
  194. audit: false
  195. }
  196. }
  197. }