UNPKG

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