-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathindex.js
71 lines (66 loc) · 1.35 KB
/
index.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
'use strict';
// enable the no config warning suppression to enable the use of this package
// where no node-config ist available
process.env.SUPPRESS_NO_CONFIG_WARNING = 'y';
const config = require('config');
config.util.setModuleDefaults('openSenseMap-API-models', {
db: {
host: 'localhost',
port: 27017,
user: 'admin',
userpass: 'admin',
authsource: 'OSeM-api',
db: 'OSeM-api',
mongo_uri: '',
},
integrations: {
ca_cert: '',
cert: '',
key: '',
redis: {
host: '',
port: 6379,
username: '',
password: '',
db: 0,
},
mailer: {
url: '',
origin: '',
queue: 'mails',
},
mqtt: {
url: '',
},
},
password: {
min_length: 8,
salt_factor: 13,
},
claims_ttl: {
amount: 1,
unit: 'd',
},
pagination: {
max_boxes: 3
},
image_folder: './userimages/',
});
const { model: Box } = require('./src/box/box'),
{ model: Measurement } = require('./src/measurement/measurement'),
{ model: Sensor } = require('./src/sensor/sensor'),
{ model: User } = require('./src/user/user'),
{ model: Claim } = require('./src/box/claim'),
utils = require('./src/utils'),
decoding = require('./src/measurement/decoding'),
db = require('./src/db');
module.exports = {
Box,
Claim,
Measurement,
Sensor,
User,
utils,
decoding,
db
};