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 |
|
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 | iobrokerInstance: '%%instance%%',
|
30 | iobrokerConfig: '%%config%%',
|
31 |
|
32 | // Retry time in milliseconds for MQTT connections
|
33 | mqttReconnectTime: 15000,
|
34 |
|
35 | // Retry time in milliseconds for Serial port connections
|
36 | serialReconnectTime: 15000,
|
37 |
|
38 | // Retry time in milliseconds for TCP socket connections
|
39 | //socketReconnectTime: 10000,
|
40 |
|
41 | // Timeout in milliseconds for TCP server socket connections
|
42 | // defaults to no timeout
|
43 | //socketTimeout: 120000,
|
44 |
|
45 | // Maximum number of lines in debug window before pruning
|
46 | debugMaxLength: 1000,
|
47 |
|
48 | // The file containing the flows. If not set, it defaults to flows_<hostname>.json
|
49 | flowFile: 'flows.json',
|
50 |
|
51 | // To enabled pretty-printing of the flow within the flow file, set the following
|
52 | // property to true:
|
53 | flowFilePretty: true,
|
54 |
|
55 | // By default, all user data is stored in the Node-RED install directory. To
|
56 | // use a different location, the following property can be used
|
57 | userDir: __dirname + '/',
|
58 |
|
59 | // Node-RED scans the `nodes` directory in the install directory to find nodes.
|
60 | // The following property can be used to specify an additional directory to scan.
|
61 | nodesDir: __dirname + '/../nodes/',
|
62 |
|
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 |
|
68 | // You can protect the user interface with a userid and password by using the following property.
|
69 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
70 | //httpAdminAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
71 |
|
72 | // Some nodes, such as HTTP In, can be used to listen for incoming http requests.
|
73 | // By default, these are served relative to '/'. The following property
|
74 | // can be used to specifiy a different root path. If set to false, this is
|
75 | // disabled.
|
76 | //httpNodeRoot: '/nodes',
|
77 |
|
78 | // To password protect the node-defined HTTP endpoints, the following property
|
79 | // can be used.
|
80 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
81 | //httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
82 |
|
83 | // When httpAdminRoot is used to move the UI to a different root path, the
|
84 | // following property can be used to identify a directory of static content
|
85 | // that should be served at http://localhost:1880/.
|
86 | //httpStatic: '/home/nol/node-red-dashboard/',
|
87 |
|
88 | // To password protect the static content, the following property can be used.
|
89 | // The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
|
90 | //httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
91 |
|
92 | // The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
|
93 | // to apply the same root to both parts.
|
94 | //httpRoot: '/red',
|
95 |
|
96 | // The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth',
|
97 | // to apply the same authentication to both parts.
|
98 | //httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
|
99 |
|
100 | // The following property can be used to disable the editor. The admin API
|
101 | // is not affected by this option. To disable both the editor and the admin
|
102 | // API, use either the httpRoot or httpAdminRoot properties
|
103 | //disableEditor: false,
|
104 |
|
105 | // The following property can be used to enable HTTPS
|
106 | // See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
107 | // for details on its contents.
|
108 | // See the comment at the top of this file on how to load the `fs` module used by
|
109 | // this setting.
|
110 | //
|
111 | //https: {
|
112 | // key: fs.readFileSync('privatekey.pem'),
|
113 | // cert: fs.readFileSync('certificate.pem')
|
114 | //},
|
115 |
|
116 | // The following property can be used to configure cross-origin resource sharing
|
117 | // in the HTTP nodes.
|
118 | // See https://github.com/troygoode/node-cors#configuration-options for
|
119 | // details on its contents. The following is a basic permissive set of options:
|
120 | //httpNodeCors: {
|
121 | // origin: "*",
|
122 | // methods: "GET,PUT,POST,DELETE"
|
123 | //},
|
124 |
|
125 | // Anything in this hash is globally available to all functions.
|
126 | // It is accessed as context.global.
|
127 | // eg:
|
128 | // functionGlobalContext: { os:require('os') }
|
129 | // can be accessed in a function block as:
|
130 | // context.global.os
|
131 |
|
132 | functionGlobalContext: {
|
133 | //'%%functionGlobalContext%%'
|
134 | // os:require('os'),
|
135 | // bonescript:require('bonescript'),
|
136 | // arduino:require('duino')
|
137 | }
|
138 |
|
139 | }
|