1 | /**
|
2 | * Copyright 2013 IBM Corp.
|
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: '%%port%%',
|
24 | uiHost: '%%bind%%',
|
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 | iobrokerInstance: '%%instance%%',
|
31 | iobrokerConfig: '%%config%%',
|
32 | allowCreationOfForeignObjects: '%%allowCreationOfForeignObjects%%',
|
33 |
|
34 | // Retry time in milliseconds for MQTT connections
|
35 | mqttReconnectTime: 15000,
|
36 |
|
37 | // Retry time in milliseconds for Serial port connections
|
38 | serialReconnectTime: 15000,
|
39 |
|
40 | // Retry time in milliseconds for TCP socket connections
|
41 | //socketReconnectTime: 10000,
|
42 |
|
43 | // Timeout in milliseconds for TCP server socket connections
|
44 | // defaults to no timeout
|
45 | //socketTimeout: 120000,
|
46 |
|
47 | // Maximum number of lines in debug window before pruning
|
48 | debugMaxLength: 1000,
|
49 |
|
50 | // The file containing the flows. If not set, it defaults to flows_<hostname>.json
|
51 | flowFile: 'flows.json',
|
52 |
|
53 | // To enabled pretty-printing of the flow within the flow file, set the following
|
54 | // property to true:
|
55 | flowFilePretty: true,
|
56 |
|
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: __dirname + '/',
|
60 |
|
61 | // Node-RED scans the `nodes` directory in the install directory to find nodes.
|
62 | // The following property can be used to specify an additional directory to scan.
|
63 | nodesDir: '%%nodesdir%%',
|
64 |
|
65 | // By default, the Node-RED UI is available at http://localhost:1880/
|
66 | // The following property can be used to specify a different root path.
|
67 | // If set to false, this is disabled.
|
68 | //httpAdminRoot: '/admin',
|
69 |
|
70 | // You can protect the user interface with a userid and password by using the following property.
|
71 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
72 | httpAdminAuth: '%%auth%%',
|
73 |
|
74 | // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
|
75 | // By default, these are served relative to '/'. The following property
|
76 | // can be used to specifiy a different root path. If set to false, this is
|
77 | // disabled.
|
78 | //httpNodeRoot: '/nodes',
|
79 |
|
80 | // To password protect the node-defined HTTP endpoints, the following property
|
81 | // can be used.
|
82 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
83 | //httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
84 |
|
85 | // When httpAdminRoot is used to move the UI to a different root path, the
|
86 | // following property can be used to identify a directory of static content
|
87 | // that should be served at http://localhost:1880/.
|
88 | //httpStatic: '/home/nol/node-red-dashboard/',
|
89 |
|
90 | // To password protect the static content, the following property can be used.
|
91 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
92 | //httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
93 |
|
94 | // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
|
95 | // to apply the same root to both parts.
|
96 | httpRoot: "'%%httpRoot%%'",
|
97 |
|
98 | // The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth',
|
99 | // to apply the same authentication to both parts.
|
100 | //httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
101 |
|
102 | // The following property can be used to disable the editor. The admin API
|
103 | // is not affected by this option. To disable both the editor and the admin
|
104 | // API, use either the httpRoot or httpAdminRoot properties
|
105 | //disableEditor: false,
|
106 |
|
107 | // The following property can be used to enable HTTPS
|
108 | // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
109 | // for details on its contents.
|
110 | // See the comment at the top of this file on how to load the `fs` module used by
|
111 | // this setting.
|
112 | //
|
113 | //https: {
|
114 | // key: fs.readFileSync('privatekey.pem'),
|
115 | // cert: fs.readFileSync('certificate.pem')
|
116 | //},
|
117 |
|
118 | // The following property can be used to configure cross-origin resource sharing
|
119 | // in the HTTP nodes.
|
120 | // See https://github.com/troygoode/node-cors#configuration-options for
|
121 | // details on its contents. The following is a basic permissive set of options:
|
122 | //httpNodeCors: {
|
123 | // origin: "*",
|
124 | // methods: "GET,PUT,POST,DELETE"
|
125 | //},
|
126 |
|
127 | // Anything in this hash is globally available to all functions.
|
128 | // It is accessed as context.global.
|
129 | // eg:
|
130 | // functionGlobalContext: { os:require('os') }
|
131 | // can be accessed in a function block as:
|
132 | // context.global.os
|
133 |
|
134 | valueConvert: '%%valueConvert%%',
|
135 |
|
136 | credentialSecret: "'%%credentialSecret%%'",
|
137 |
|
138 | functionGlobalContext: {
|
139 | //'%%functionGlobalContext%%'
|
140 | // os:require('os'),
|
141 | // bonescript:require('bonescript'),
|
142 | // arduino:require('duino')
|
143 | },
|
144 | // Configure the logging output
|
145 | logging: {
|
146 | // Only console logging is currently supported
|
147 | console: {
|
148 | // Level of logging to be recorded. Options are:
|
149 | // fatal - only those errors which make the application unusable should be recorded
|
150 | // error - record errors which are deemed fatal for a particular request + fatal errors
|
151 | // warn - record problems which are non fatal + errors + fatal errors
|
152 | // info - record information about the general running of the application + warn + error + fatal errors
|
153 | // debug - record information which is more verbose than info + info + warn + error + fatal errors
|
154 | // trace - record very detailed logging + debug + info + warn + error + fatal errors
|
155 | // off - turn off all logging (doesn't affect metrics or audit)
|
156 | level: "info",
|
157 | // Whether or not to include metric events in the log output
|
158 | metrics: false,
|
159 | // Whether or not to include audit events in the log output
|
160 | audit: false
|
161 | }
|
162 | },
|
163 | editorTheme: {
|
164 | projects: {
|
165 | enabled: '%%projectsEnabled%%'
|
166 | }
|
167 | }
|
168 |
|
169 | };
|