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 | // To listen on all IPv6 addresses, set uiHost to "::",
|
27 | // The following property can be used to listen on a specific interface. For
|
28 | // example, the following would only allow connections from the local machine.
|
29 | //uiHost: "127.0.0.1",
|
30 |
|
31 | // Retry time in milliseconds for MQTT connections
|
32 | mqttReconnectTime: 15000,
|
33 |
|
34 | // Retry time in milliseconds for Serial port connections
|
35 | serialReconnectTime: 15000,
|
36 |
|
37 | // Retry time in milliseconds for TCP socket connections
|
38 | //socketReconnectTime: 10000,
|
39 |
|
40 | // Timeout in milliseconds for TCP server socket connections
|
41 | // defaults to no timeout
|
42 | //socketTimeout: 120000,
|
43 |
|
44 | // Maximum number of messages to wait in queue while attempting to connect to TCP socket
|
45 | // defaults to 1000
|
46 | //tcpMsgQueueSize: 2000,
|
47 |
|
48 | // Timeout in milliseconds for HTTP request connections
|
49 | // defaults to 120 seconds
|
50 | //httpRequestTimeout: 120000,
|
51 |
|
52 | // The maximum length, in characters, of any message sent to the debug sidebar tab
|
53 | debugMaxLength: 1000,
|
54 |
|
55 | // The maximum number of messages nodes will buffer internally as part of their
|
56 | // operation. This applies across a range of nodes that operate on message sequences.
|
57 | // defaults to no limit. A value of 0 also means no limit is applied.
|
58 | //nodeMaxMessageBufferLength: 0,
|
59 |
|
60 | // To disable the option for using local files for storing keys and certificates in the TLS configuration
|
61 | // node, set this to true
|
62 | //tlsConfigDisableLocalFiles: true,
|
63 |
|
64 | // Colourise the console output of the debug node
|
65 | //debugUseColors: true,
|
66 |
|
67 | // The file containing the flows. If not set, it defaults to flows_<hostname>.json
|
68 | //flowFile: 'flows.json',
|
69 |
|
70 | // To enabled pretty-printing of the flow within the flow file, set the following
|
71 | // property to true:
|
72 | //flowFilePretty: true,
|
73 |
|
74 | // By default, credentials are encrypted in storage using a generated key. To
|
75 | // specify your own secret, set the following property.
|
76 | // If you want to disable encryption of credentials, set this property to false.
|
77 | // Note: once you set this property, do not change it - doing so will prevent
|
78 | // node-red from being able to decrypt your existing credentials and they will be
|
79 | // lost.
|
80 | //credentialSecret: "a-secret-key",
|
81 |
|
82 | // By default, all user data is stored in a directory called `.node-red` under
|
83 | // the user's home directory. To use a different location, the following
|
84 | // property can be used
|
85 | //userDir: '/home/nol/.node-red/',
|
86 |
|
87 | // Node-RED scans the `nodes` directory in the userDir to find local node files.
|
88 | // The following property can be used to specify an additional directory to scan.
|
89 | //nodesDir: '/home/nol/.node-red/nodes',
|
90 |
|
91 | // By default, the Node-RED UI is available at http://localhost:1880/
|
92 | // The following property can be used to specify a different root path.
|
93 | // If set to false, this is disabled.
|
94 | //httpAdminRoot: '/admin',
|
95 |
|
96 | // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
|
97 | // By default, these are served relative to '/'. The following property
|
98 | // can be used to specifiy a different root path. If set to false, this is
|
99 | // disabled.
|
100 | //httpNodeRoot: '/red-nodes',
|
101 |
|
102 | // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
|
103 | // to apply the same root to both parts.
|
104 | //httpRoot: '/red',
|
105 |
|
106 | // When httpAdminRoot is used to move the UI to a different root path, the
|
107 | // following property can be used to identify a directory of static content
|
108 | // that should be served at http://localhost:1880/.
|
109 | //httpStatic: '/home/nol/node-red-static/',
|
110 |
|
111 | // The maximum size of HTTP request that will be accepted by the runtime api.
|
112 | // Default: 5mb
|
113 | //apiMaxLength: '5mb',
|
114 |
|
115 | // If you installed the optional node-red-dashboard you can set it's path
|
116 | // relative to httpRoot
|
117 | //ui: { path: "ui" },
|
118 |
|
119 | // Securing Node-RED
|
120 | // -----------------
|
121 | // To password protect the Node-RED editor and admin API, the following
|
122 | // property can be used. See http://nodered.org/docs/security.html for details.
|
123 | //adminAuth: {
|
124 | // type: "credentials",
|
125 | // users: [{
|
126 | // username: "admin",
|
127 | // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
|
128 | // permissions: "*"
|
129 | // }]
|
130 | //},
|
131 |
|
132 | // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
|
133 | // the static content (httpStatic), the following properties can be used.
|
134 | // The pass field is a bcrypt hash of the password.
|
135 | // See http://nodered.org/docs/security.html#generating-the-password-hash
|
136 | //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
|
137 | //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
|
138 |
|
139 | // The following property can be used to enable HTTPS
|
140 | // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
141 | // for details on its contents.
|
142 | // See the comment at the top of this file on how to load the `fs` module used by
|
143 | // this setting.
|
144 | //
|
145 | //https: {
|
146 | // key: fs.readFileSync('privatekey.pem'),
|
147 | // cert: fs.readFileSync('certificate.pem')
|
148 | //},
|
149 |
|
150 | // The following property can be used to cause insecure HTTP connections to
|
151 | // be redirected to HTTPS.
|
152 | //requireHttps: true,
|
153 |
|
154 | // The following property can be used to disable the editor. The admin API
|
155 | // is not affected by this option. To disable both the editor and the admin
|
156 | // API, use either the httpRoot or httpAdminRoot properties
|
157 | //disableEditor: false,
|
158 |
|
159 | // The following property can be used to configure cross-origin resource sharing
|
160 | // in the HTTP nodes.
|
161 | // See https://github.com/troygoode/node-cors#configuration-options for
|
162 | // details on its contents. The following is a basic permissive set of options:
|
163 | //httpNodeCors: {
|
164 | // origin: "*",
|
165 | // methods: "GET,PUT,POST,DELETE"
|
166 | //},
|
167 |
|
168 | // If you need to set an http proxy please set an environment variable
|
169 | // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
|
170 | // For example - http_proxy=http://myproxy.com:8080
|
171 | // (Setting it here will have no effect)
|
172 | // You may also specify no_proxy (or NO_PROXY) to supply a comma separated
|
173 | // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
|
174 |
|
175 | // The following property can be used to add a custom middleware function
|
176 | // in front of all http in nodes. This allows custom authentication to be
|
177 | // applied to all http in nodes, or any other sort of common request processing.
|
178 | //httpNodeMiddleware: function(req,res,next) {
|
179 | // // Handle/reject the request, or pass it on to the http in node by calling next();
|
180 | // // Optionally skip our rawBodyParser by setting this to true;
|
181 | // //req.skipRawBodyParser = true;
|
182 | // next();
|
183 | //},
|
184 |
|
185 | // The following property can be used to pass custom options to the Express.js
|
186 | // server used by Node-RED. For a full list of available options, refer
|
187 | // to http://expressjs.com/en/api.html#app.settings.table
|
188 | //httpServerOptions: { },
|
189 |
|
190 | // The following property can be used to verify websocket connection attempts.
|
191 | // This allows, for example, the HTTP request headers to be checked to ensure
|
192 | // they include valid authentication information.
|
193 | //webSocketNodeVerifyClient: function(info) {
|
194 | // // 'info' has three properties:
|
195 | // // - origin : the value in the Origin header
|
196 | // // - req : the HTTP request
|
197 | // // - secure : true if req.connection.authorized or req.connection.encrypted is set
|
198 | // //
|
199 | // // The function should return true if the connection should be accepted, false otherwise.
|
200 | // //
|
201 | // // Alternatively, if this function is defined to accept a second argument, callback,
|
202 | // // it can be used to verify the client asynchronously.
|
203 | // // The callback takes three arguments:
|
204 | // // - result : boolean, whether to accept the connection or not
|
205 | // // - code : if result is false, the HTTP error status to return
|
206 | // // - reason: if result is false, the HTTP reason string to return
|
207 | //},
|
208 |
|
209 | // The following property can be used to seed Global Context with predefined
|
210 | // values. This allows extra node modules to be made available with the
|
211 | // Function node.
|
212 | // For example,
|
213 | // functionGlobalContext: { os:require('os') }
|
214 | // can be accessed in a function block as:
|
215 | // global.get("os")
|
216 | functionGlobalContext: {
|
217 | // os:require('os'),
|
218 | // jfive:require("johnny-five"),
|
219 | // j5board:require("johnny-five").Board({repl:false})
|
220 | },
|
221 | // `global.keys()` returns a list of all properties set in global context.
|
222 | // This allows them to be displayed in the Context Sidebar within the editor.
|
223 | // In some circumstances it is not desirable to expose them to the editor. The
|
224 | // following property can be used to hide any property set in `functionGlobalContext`
|
225 | // from being list by `global.keys()`.
|
226 | // By default, the property is set to false to avoid accidental exposure of
|
227 | // their values. Setting this to true will cause the keys to be listed.
|
228 | exportGlobalContextKeys: false,
|
229 |
|
230 |
|
231 | // Context Storage
|
232 | // The following property can be used to enable context storage. The configuration
|
233 | // provided here will enable file-based context that flushes to disk every 30 seconds.
|
234 | // Refer to the documentation for further options: https://nodered.org/docs/api/context/
|
235 | //
|
236 | //contextStorage: {
|
237 | // default: {
|
238 | // module:"localfilesystem"
|
239 | // },
|
240 | //},
|
241 |
|
242 | // The following property can be used to order the categories in the editor
|
243 | // palette. If a node's category is not in the list, the category will get
|
244 | // added to the end of the palette.
|
245 | // If not set, the following default order is used:
|
246 | //paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced'],
|
247 |
|
248 | // Configure the logging output
|
249 | logging: {
|
250 | // Only console logging is currently supported
|
251 | console: {
|
252 | // Level of logging to be recorded. Options are:
|
253 | // fatal - only those errors which make the application unusable should be recorded
|
254 | // error - record errors which are deemed fatal for a particular request + fatal errors
|
255 | // warn - record problems which are non fatal + errors + fatal errors
|
256 | // info - record information about the general running of the application + warn + error + fatal errors
|
257 | // debug - record information which is more verbose than info + info + warn + error + fatal errors
|
258 | // trace - record very detailed logging + debug + info + warn + error + fatal errors
|
259 | // off - turn off all logging (doesn't affect metrics or audit)
|
260 | level: "info",
|
261 | // Whether or not to include metric events in the log output
|
262 | metrics: false,
|
263 | // Whether or not to include audit events in the log output
|
264 | audit: false
|
265 | }
|
266 | },
|
267 |
|
268 | // Customising the editor
|
269 | editorTheme: {
|
270 | projects: {
|
271 | // To enable the Projects feature, set this value to true
|
272 | enabled: false
|
273 | }
|
274 | }
|
275 | }
|