-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings.js
87 lines (85 loc) · 2.28 KB
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
'use strict';
var path = require("path");
var when = require("when");
console.log(path.join(__dirname, "nodes"));
var settings = module.exports = {
uiPort: process.env.PORT || 9000,
mqttReconnectTime: 15000,
serialReconnectTime: 15000,
debugMaxLength: 10000000,
debugUseColors: true,
nodesDir: path.join(__dirname, "nodes"),
uiHost: "0.0.0.0",
nodesExcludes:[
'66-mongodb.js',
'75-exec.js',
'35-arduino.js',
'36-rpi-gpio.js',
'25-serial.js',
'28-tail.js',
'50-file.js',
'31-tcpin.js',
'32-udp.js',
'23-watch.js',
'72-sentiment.js',
'32-feedparse.js',
'27-twitter.js',
'32-feedparse.js',
'61-email.js',
'node-red-node-serialport',
'node-red-node-feedparser',
'node-red-node-email',
'node-red-node-twitter'],
paletteCategories: ['subflows',
'input',
'output',
'function',
'social',
'mobile',
'storage',
'analysis',
'advanced'],
autoInstallModules: false,
httpAdminRoot: '/flow',
httpStatic: path.join(__dirname,"public"),
functionGlobalContext: { },
flowFile: 'flows.json',
flowFilePretty: true,
userDir: './data',
requireHttps: false,
logging: {
console: {
level: "debug",
metrics: false,
audit: false
}
},
editorTheme: {
page: {
title: "mandrake.ai"
},
header: {
title: "mandrake.ai"
}
},
}
if (process.env.NODE_RED_USERNAME && process.env.NODE_RED_PASSWORD) {
settings.adminAuth = {
type: "credentials",
users: function(username) {
if (process.env.NODE_RED_USERNAME == username) {
return when.resolve({username:username,permissions:"*"});
} else {
return when.resolve(null);
}
},
authenticate: function(username, password) {
if (process.env.NODE_RED_USERNAME == username &&
process.env.NODE_RED_PASSWORD == password) {
return when.resolve({username:username,permissions:"*"});
} else {
return when.resolve(null);
}
}
}
}