1
+ /* JVA 2018-10-28 */
2
+ /**
3
+ * Copyright 2013, 2016 IBM Corp.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ **/
17
+
18
+ // The `https` setting requires the `fs` module. Uncomment the following
19
+ // to make it available:
20
+ //var fs = require("fs");
21
+
22
+ module . exports = {
23
+ // the tcp port that the Node-RED web server is listening on
24
+ uiPort : process . env . PORT || 1880 ,
25
+
26
+ // By default, the Node-RED UI accepts connections on all IPv4 interfaces.
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
+ // Timeout in milliseconds for HTTP request connections
45
+ // defaults to 120 seconds
46
+ //httpRequestTimeout: 120000,
47
+
48
+ // The maximum length, in characters, of any message sent to the debug sidebar tab
49
+ debugMaxLength : 1000 ,
50
+
51
+ // The file containing the flows. If not set, it defaults to flows_<hostname>.json
52
+ //flowFile: 'flows.json',
53
+
54
+ // To enabled pretty-printing of the flow within the flow file, set the following
55
+ // property to true:
56
+ //flowFilePretty: true,
57
+
58
+ // By default, all user data is stored in the Node-RED install directory. To
59
+ // use a different location, the following property can be used
60
+ //userDir: '/home/nol/.node-red/',
61
+
62
+ // Node-RED scans the `nodes` directory in the install directory to find nodes.
63
+ // The following property can be used to specify an additional directory to scan.
64
+ //nodesDir: '/home/nol/.node-red/nodes',
65
+
66
+ // By default, the Node-RED UI is available at http://localhost:1880/
67
+ // The following property can be used to specifiy a different root path.
68
+ // If set to false, this is disabled.
69
+ //httpAdminRoot: '/admin',
70
+
71
+ // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
72
+ // By default, these are served relative to '/'. The following property
73
+ // can be used to specifiy a different root path. If set to false, this is
74
+ // disabled.
75
+ //httpNodeRoot: '/red-nodes',
76
+
77
+ // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
78
+ // to apply the same root to both parts.
79
+ // JVA 2018-11-12: activated httpRoot
80
+ httpRoot : '/node-red-test' ,
81
+
82
+ // When httpAdminRoot is used to move the UI to a different root path, the
83
+ // following property can be used to identify a directory of static content
84
+ // that should be served at http://localhost:1880/.
85
+ //httpStatic: '/home/nol/node-red-static/',
86
+
87
+ // Securing Node-RED
88
+ // -----------------
89
+ // To password protect the Node-RED editor and admin API, the following
90
+ // property can be used. See http://nodered.org/docs/security.html for details.
91
+ //adminAuth: {
92
+ // type: "credentials",
93
+ // users: [{
94
+ // username: "admin",
95
+ // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
96
+ // permissions: "*"
97
+ // }]
98
+ //},
99
+
100
+ adminAuth : {
101
+ type : "credentials" ,
102
+ users : [ {
103
+ username : process . env . USERNAME ,
104
+ password : process . env . PASSWORD ,
105
+ permissions : "*"
106
+ } ]
107
+ } ,
108
+
109
+
110
+ // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
111
+ // the static content (httpStatic), the following properties can be used.
112
+ // The pass field is a bcrypt hash of the password.
113
+ // See http://nodered.org/docs/security.html#generating-the-password-hash
114
+ //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
115
+ //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
116
+
117
+ // The following property can be used to enable HTTPS
118
+ // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
119
+ // for details on its contents.
120
+ // See the comment at the top of this file on how to load the `fs` module used by
121
+ // this setting.
122
+ //
123
+ //https: {
124
+ // key: fs.readFileSync('privatekey.pem'),
125
+ // cert: fs.readFileSync('certificate.pem')
126
+ //},
127
+
128
+ // The following property can be used to disable the editor. The admin API
129
+ // is not affected by this option. To disable both the editor and the admin
130
+ // API, use either the httpRoot or httpAdminRoot properties
131
+ //disableEditor: false,
132
+
133
+ // The following property can be used to configure cross-origin resource sharing
134
+ // in the HTTP nodes.
135
+ // See https://github.com/troygoode/node-cors#configuration-options for
136
+ // details on its contents. The following is a basic permissive set of options:
137
+ //httpNodeCors: {
138
+ // origin: "*",
139
+ // methods: "GET,PUT,POST,DELETE"
140
+ //},
141
+
142
+ // If you need to set an http proxy please set an environment variable
143
+ // called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
144
+ // For example - http_proxy=http://myproxy.com:8080
145
+ // (Setting it here will have no effect)
146
+ // You may also specify no_proxy (or NO_PROXY) to supply a comma separated
147
+ // list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
148
+
149
+ // The following property can be used to add a custom middleware function
150
+ // in front of all http in nodes. This allows custom authentication to be
151
+ // applied to all http in nodes, or any other sort of common request processing.
152
+ //httpNodeMiddleware: function(req,res,next) {
153
+ // // Handle/reject the request, or pass it on to the http in node
154
+ // // by calling next();
155
+ // next();
156
+ //},
157
+
158
+ // Anything in this hash is globally available to all functions.
159
+ // It is accessed as context.global.
160
+ // eg:
161
+ // functionGlobalContext: { os:require('os') }
162
+ // can be accessed in a function block as:
163
+ // context.global.os
164
+
165
+ functionGlobalContext : {
166
+ process : process ,
167
+ os : require ( 'os' )
168
+ // octalbonescript:require('octalbonescript'),
169
+ // jfive:require("johnny-five"),
170
+ // j5board:require("johnny-five").Board({repl:false})
171
+ } ,
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
+
179
+ editorTheme : {
180
+ projects : {
181
+ enabled : true
182
+ }
183
+ } ,
184
+
185
+
186
+ // Configure the logging output
187
+ logging : {
188
+ // Only console logging is currently supported
189
+ console : {
190
+ // Level of logging to be recorded. Options are:
191
+ // fatal - only those errors which make the application unusable should be recorded
192
+ // error - record errors which are deemed fatal for a particular request + fatal errors
193
+ // warn - record problems which are non fatal + errors + fatal errors
194
+ // info - record information about the general running of the application + warn + error + fatal errors
195
+ // debug - record information which is more verbose than info + info + warn + error + fatal errors
196
+ // trace - record very detailed logging + debug + info + warn + error + fatal errors
197
+ level : "info" ,
198
+ // Whether or not to include metric events in the log output
199
+ metrics : false ,
200
+ // Whether or not to include audit events in the log output
201
+ audit : false
202
+ }
203
+ }
204
+ }
0 commit comments