Advertisement
Guest User

Untitled

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