1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/settings.js

163 lines
6.9 KiB
JavaScript
Raw Normal View History

2013-09-05 16:02:48 +02:00
/**
* Copyright 2013, 2015 IBM Corp.
2013-09-05 16:02:48 +02:00
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
// The `https` setting requires the `fs` module. Uncomment the following
// to make it available:
//var fs = require("fs");
2013-09-05 16:02:48 +02:00
module.exports = {
2013-11-13 16:42:38 +01:00
// the tcp port that the Node-RED web server is listening on
2013-09-05 16:02:48 +02:00
uiPort: 1880,
// By default, the Node-RED UI accepts connections on all IPv4 interfaces.
// The following property can be used to listen on a specific interface. For
// example, the following would only allow connections from the local machine.
//uiHost: "127.0.0.1",
2013-11-13 16:42:38 +01:00
// Retry time in milliseconds for MQTT connections
2013-09-05 16:02:48 +02:00
mqttReconnectTime: 15000,
2013-11-13 16:42:38 +01:00
// Retry time in milliseconds for Serial port connections
2013-09-05 16:02:48 +02:00
serialReconnectTime: 15000,
2013-11-13 16:42:38 +01:00
// Retry time in milliseconds for TCP socket connections
//socketReconnectTime: 10000,
// Timeout in milliseconds for TCP server socket connections
// defaults to no timeout
//socketTimeout: 120000,
// The maximum length, in characters, of any message sent to the debug sidebar tab
debugMaxLength: 1000,
2013-09-05 16:02:48 +02:00
2013-10-04 18:28:15 +02:00
// The file containing the flows. If not set, it defaults to flows_<hostname>.json
//flowFile: 'flows.json',
2014-06-07 23:33:29 +02:00
// To enabled pretty-printing of the flow within the flow file, set the following
// property to true:
//flowFilePretty: true,
// By default, all user data is stored in the Node-RED install directory. To
// use a different location, the following property can be used
//userDir: '/home/nol/.node-red/',
// Node-RED scans the `nodes` directory in the install directory to find nodes.
// The following property can be used to specify an additional directory to scan.
//nodesDir: '/home/nol/.node-red/nodes',
2013-09-05 16:02:48 +02:00
// By default, the Node-RED UI is available at http://localhost:1880/
// The following property can be used to specifiy a different root path.
2014-09-22 15:33:26 +02:00
// If set to false, this is disabled.
2014-02-16 01:39:30 +01:00
//httpAdminRoot: '/admin',
// You can protect the user interface with a userid and password by using the following property.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpAdminAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// Some nodes, such as HTTP In, can be used to listen for incoming http requests.
// By default, these are served relative to '/'. The following property
2014-09-22 15:33:26 +02:00
// can be used to specifiy a different root path. If set to false, this is
// disabled.
2014-02-16 01:39:30 +01:00
//httpNodeRoot: '/nodes',
// To password protect the node-defined HTTP endpoints, the following property
// can be used.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// When httpAdminRoot is used to move the UI to a different root path, the
2013-11-11 22:16:57 +01:00
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.
//httpStatic: '/home/nol/node-red-dashboard/',
2014-02-16 01:39:30 +01:00
// To password protect the static content, the following property can be used.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
// to apply the same root to both parts.
//httpRoot: '/red',
// The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth',
// to apply the same authentication to both parts.
//httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
2014-09-22 15:33:26 +02:00
// The following property can be used to disable the editor. The admin API
// is not affected by this option. To disable both the editor and the admin
// API, use either the httpRoot or httpAdminRoot properties
//disableEditor: false,
2013-09-05 16:02:48 +02:00
// The following property can be used to enable HTTPS
// See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
// for details on its contents.
// See the comment at the top of this file on how to load the `fs` module used by
// this setting.
//
2013-09-05 16:02:48 +02:00
//https: {
// key: fs.readFileSync('privatekey.pem'),
// cert: fs.readFileSync('certificate.pem')
//},
// The following property can be used to configure cross-origin resource sharing
// in the HTTP nodes.
// See https://github.com/troygoode/node-cors#configuration-options for
// details on its contents. The following is a basic permissive set of options:
//httpNodeCors: {
// origin: "*",
// methods: "GET,PUT,POST,DELETE"
//},
2013-09-05 16:02:48 +02:00
// Anything in this hash is globally available to all functions.
// It is accessed as context.global.
// eg:
// functionGlobalContext: { os:require('os') }
// can be accessed in a function block as:
// context.global.os
functionGlobalContext: {
// os:require('os'),
// bonescript:require('bonescript'),
// jfive:require("johnny-five"),
// jboard:require("johnny-five").Board()
},
// The following property can be used to order the categories in the editor
// palette. If a node's category is not in the list, the category will get
// added to the end of the palette.
// If not set, the following default order is used:
//paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'],
2015-02-03 23:02:26 +01:00
// Configure the logging output
logging: {
// Only console logging is currently supported
console: {
// Level of logging to be recorded. Options are:
// fatal - only those errors which make the application unusable should be recorded
// error - record errors which are deemed fatal for a particular request + fatal errors
// warn - record problems which are non fatal + errors + fatal errors
// info - record information about the general running of the application + warn + error + fatal errors
// debug - record information which is more verbose than info + info + warn + error + fatal errors
// trace - record very detailed logging + debug + info + warn + error + fatal errors
level: "info",
// Whether or not to include metric events in the log output
metrics: false
}
}
2013-09-05 16:02:48 +02:00
}