config.js
1.5 KB
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
// # config
exports = module.exports = function() {
return {
defaults: {
server: {
host: 'localhost',
clusterEnabled: true
},
cookieParser: '',
mongo: {
host: 'localhost',
port: 27017,
opts: {},
// faster - don't perform 2nd request to verify
// log message was received/saved
safe: false
},
redis: {
host: 'localhost',
port: 6379,
maxAge: 24 * 60 * 60 * 1000
},
output: {
handleExceptions: true,
colorize: true,
prettyPrint: true,
level: 'info'
},
logger: {
'console': true,
mongo: false,
file: false,
}
},
development: {
server: {
env: 'development',
port: 3000,
},
mongo: {
db: 'igloo-development',
},
redis: {
prefix: 'igloo-development'
}
},
production: {
server: {
env: 'production',
port: 80,
},
mongo: {
db: 'igloo-production',
},
redis: {
prefix: 'igloo-production'
},
output: {
handleExceptions: false,
prettyPrint: false,
colorize: false
},
logger: {
'console': false,
mongo: true,
// <https://github.com/flatiron/winston#file-transport>
file: {
filename: '/var/log/igloo.log',
// TODO: maxsize
// TODO: maxFiles
timestamp: true
}
}
}
}
}
exports['@singleton'] = true