forked from CMU-CREATE-Lab/esdr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
75 lines (71 loc) · 3.15 KB
/
config.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
var config = require('nconf');
var path = require('path');
var log = require('log4js').getLogger('esdr:config');
var RunMode = require('run-mode');
var configFile = './config-' + RunMode.get() + '.json';
var mailConfigFile = './mail-config-' + RunMode.get() + '.json';
log.info("Using config file: " + configFile);
log.info("Using mail config file: " + mailConfigFile);
config.argv().env();
config.add('mail', { type : 'file', file : mailConfigFile });
config.add('global', { type : 'file', file : configFile });
config.defaults({
"server" : {
"port" : 3000
},
"esdr" : {
// the URL a client (e.g. web browser) must use to access the ESDR REST API
"apiRootUrl" : "http://localhost:3000/api/v1",
// the URL that the ESDR server must use to access itself for OAuth (should be localhost)
"oauthRootUrl" : "http://localhost:3000/oauth/token"
},
"cookie" : {
"name" : "esdr_sid",
"secret" : "Thou art my heaven, and I thine eremite.",
"isSecure" : false
},
"esdrClient" : {
"displayName" : "ESDR",
"clientName" : "ESDR",
"clientSecret" : "What I cannot create, I do not understand.",
"email" : "esdr-admin@cmucreatelab.org",
"resetPasswordUrl" : "http://localhost:3000/password-reset/:resetPasswordToken",
"verificationUrl" : "http://localhost:3000/verification/:verificationToken",
"isPublic" : true
},
"httpAccessLogDirectory" : path.join(__dirname, './logs/access.log'),
"resetPasswordToken" : {
"willReturnViaApi" : false,
"willEmailToUser" : true
},
"verificationToken" : {
"willReturnViaApi" : false,
"willEmailToUser" : true
},
"security" : {
"tokenLifeSecs" : 7 * 24 * 60 * 60 // 7 days
},
"database" : {
"host" : "localhost",
"port" : "3306",
"database" : "esdr",
"username" : "esdr",
"password" : "password",
"pool" : {
"connectionLimit" : 10
}
},
"datastore" : {
"binDirectory" : "./datastore/bin",
"dataDirectory" : "./datastore/data-dev"
},
"mail" : {
"smtp" : {
"host" : "smtp.host.name.here",
"port" : 587,
"login" : "login",
"password" : "password"
}
}
});
module.exports = config;