-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
env.js
60 lines (58 loc) · 1.09 KB
/
env.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
'use strict'
var clean = require('mongo-clean')
var cleanopts = {
action: 'deleteMany'
}
module.exports = {
mongo: {
mqemitter: {
name: 'mqemitter-mongodb',
options: {
url: 'mongodb://127.0.0.1/aedes'
}
},
persistence: {
name: 'aedes-persistence-mongodb',
options: {
url: 'mongodb://127.0.0.1/aedes'
}
},
clusters: true,
waitForReady: true,
cleanDb: function (persistence, cb) {
clean(persistence._db, cleanopts, function (err, db) {
if (err) {
return cb(err)
}
cb()
})
}
},
redis: {
mqemitter: {
name: 'mqemitter-redis',
options: {}
},
persistence: {
name: 'aedes-persistence-redis',
options: {}
},
clusters: true,
waitForReady: true,
cleanDb: function (persistence, cb) {
persistence._db.flushall(cb)
}
},
default: {
mqemitter: {
name: 'mqemitter',
options: {}
},
persistence: {
name: 'aedes-persistence',
options: {}
},
clusters: false,
waitForReady: false
}
}